【问题标题】:How to download Ruby (<2.0) on virtualbox/ubunto 20.04 using rbenv如何使用 rbenv 在 vi​​rtualbox/ubuntu 20.04 上下载 Ruby (<2.0)
【发布时间】:2021-10-22 19:29:42
【问题描述】:

我在使用 rbenv 安装 Ruby 时遇到问题,这似乎是一个 openssl 问题。我按照以下链接没有成功

链接: OpenSSL error installing Ruby 2.1.x and 2.3.x on Archlinux with ruby-install/ruby-build

https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error

Ubuntu 20.04 OpenSSL 1.0.2 ruby-build 20211019


scoop@scoop-VirtualBox:~$ rbenv install 1.9.3-p327

Downloading yaml-0.1.6.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/scoop/.rbenv/versions/1.9.3-p327

Downloading ruby-1.9.3-p327.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2
Installing ruby-1.9.3-p327...

WARNING: ruby-1.9.3-p327 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.


BUILD FAILED (Ubuntu 20.04 using ruby-build 20211019)

Inspect or clean up the working tree at /tmp/ruby-build.20211022151319.51817.ZFwydR
Results logged to /tmp/ruby-build.20211022151319.51817.log

Last 10 log lines:
      |     ^~~~~~~~~~~~
ossl_ocsp.c: In function ‘ossl_ocspcid_get_serial’:

ossl_ocsp.c:694:1: warning: control reaches end of non-void function [-Wreturn-type]
  694 | }
      | ^

make[2]: *** [Makefile:267: ossl_ocsp.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327/ext/openssl'

make[1]: *** [exts.mk:126: ext/openssl/all] Error 2
make[1]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327'
make: *** [uncommon.mk:178: build-ext] Error 2

【问题讨论】:

    标签: ruby linux ssl


    【解决方案1】:

    我发现 Ubuntu > 18.04 没有正确的依赖项来支持 OpenSSL 1.0,所以我切换到 18.04 并执行了以下操作:

    # cd into source directory you downloaded and unarchived
    ./config --prefix=/opt/openssl-1.0 shared
    make
    make test
    sudo make install
    RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/openssl-1.0" rbenv install <version>
    

    这来自以下链接: https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      • 2020-12-24
      • 1970-01-01
      • 1970-01-01
      • 2015-03-24
      • 2014-07-19
      • 2021-11-13
      相关资源
      最近更新 更多