无法构建 ruby 2.2.2 -- 各种未声明的 SSLv3_ 方法
Can't build ruby 2.2.2 -- various SSLv3_ methods undeclared
我正在使用 rvm 安装 Ruby,但是我有一个我不明白的错误。这是我在编译过程中某处的控制台中得到的:
derby git:(master) rvm install ruby-2.2.2
ruby-2.2.2 - #removing src/ruby-2.2.2 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/16.04/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/share/rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu(s)...
ruby-2.2.2 - #downloading ruby-2.2.2, this may take a while depending on your connection...
ruby-2.2.2 - #extracting ruby-2.2.2 to /usr/share/rvm/src/ruby-2.2.2 - please wait
ruby-2.2.2 - #applying patch /usr/share/rvm/patches/ruby/2.2.2/fix_installing_bundled_gems.patch - please wait
ruby-2.2.2 - #configuring - please wait
ruby-2.2.2 - #post-configuration - please wait
ruby-2.2.2 - #compiling - please wait
Error running '__rvm_make -j8',
showing last 15 lines of /home/krex/.rvm/log/1478709580_ruby-2.2.2/make.log
compiling constants.c
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/openssl'
exts.mk:202: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
linking shared-object zlib.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/zlib'
linking shared-object socket.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/socket'
linking shared-object ripper.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/ripper'
make[1]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.
我的openssl版本是:OpenSSL 1.0.2j 26 Sep 2016
log file /home/krex/.rvm/log/1478709580_ruby-2.2.2/make.log 包含此编译错误:
compiling ossl_x509cert.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:142:27: error: ‘SSLv3_server_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:143:27: error: ‘SSLv3_client_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
Makefile:293: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
我尝试了这个问题的解决方案,但这也没有帮助:
Rbenv ruby 2.2.2 install fail Ubuntu 14.04
如何解决此错误并安装 Ruby?
rbenv 也有类似的问题:Cannot install Ruby 2.2.3 in ubuntu 14.04。
这似乎是 Ruby 2.2.2 和 2.2.3 使用某些版本的 openssl 构建时的问题。可以的话,换成更高版本的Ruby2.2。现在最新的是 2.2.5.
如果一定要用Ruby2.2.2,还是有希望的。 rbenv issue suggested a patch for Ruby 2.2.2;几个用户说这对他们有用。尝试使用该补丁安装 Ruby:
rvm install ruby-2.2.2 --patch https://gist.githubusercontent.com/mislav/055441129184a1512bb5/raw
我正在使用 rvm 安装 Ruby,但是我有一个我不明白的错误。这是我在编译过程中某处的控制台中得到的:
derby git:(master) rvm install ruby-2.2.2
ruby-2.2.2 - #removing src/ruby-2.2.2 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/16.04/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/share/rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu(s)...
ruby-2.2.2 - #downloading ruby-2.2.2, this may take a while depending on your connection...
ruby-2.2.2 - #extracting ruby-2.2.2 to /usr/share/rvm/src/ruby-2.2.2 - please wait
ruby-2.2.2 - #applying patch /usr/share/rvm/patches/ruby/2.2.2/fix_installing_bundled_gems.patch - please wait
ruby-2.2.2 - #configuring - please wait
ruby-2.2.2 - #post-configuration - please wait
ruby-2.2.2 - #compiling - please wait
Error running '__rvm_make -j8',
showing last 15 lines of /home/krex/.rvm/log/1478709580_ruby-2.2.2/make.log
compiling constants.c
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/openssl'
exts.mk:202: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
linking shared-object zlib.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/zlib'
linking shared-object socket.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/socket'
linking shared-object ripper.so
make[2]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2/ext/ripper'
make[1]: Leaving directory '/usr/share/rvm/src/ruby-2.2.2'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.
我的openssl版本是:OpenSSL 1.0.2j 26 Sep 2016
log file /home/krex/.rvm/log/1478709580_ruby-2.2.2/make.log 包含此编译错误:
compiling ossl_x509cert.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:142:27: error: ‘SSLv3_server_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:143:27: error: ‘SSLv3_client_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
Makefile:293: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
我尝试了这个问题的解决方案,但这也没有帮助: Rbenv ruby 2.2.2 install fail Ubuntu 14.04
如何解决此错误并安装 Ruby?
rbenv 也有类似的问题:Cannot install Ruby 2.2.3 in ubuntu 14.04。
这似乎是 Ruby 2.2.2 和 2.2.3 使用某些版本的 openssl 构建时的问题。可以的话,换成更高版本的Ruby2.2。现在最新的是 2.2.5.
如果一定要用Ruby2.2.2,还是有希望的。 rbenv issue suggested a patch for Ruby 2.2.2;几个用户说这对他们有用。尝试使用该补丁安装 Ruby:
rvm install ruby-2.2.2 --patch https://gist.githubusercontent.com/mislav/055441129184a1512bb5/raw