问题
I can not seem to install Ruby 2.1 on Debian Wheezy. Every time, it throws an OpenSSL error. Here are my installation steps:
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties openssl
cd /root
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.gz
tar -xvzf ruby-2.1.0.tar.gz
cd /root/ruby-2.1.0
./configure prefix=/opt/rubies/ruby-2.1.0
make && make install
& the resulting error:
ossl_ssl.c:2232:5: error: ‘SSL_OP_MSIE_SSLV2_RSA_PADDING’ undeclared (first use in this function)
ossl_ssl.c:2232:5: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/root/ruby-2.1.0/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/root/ruby-2.1.0'
make: *** [build-ext] Error 2
This error started affecting my installation today. I've been trying to resolve the issue all afternoon with no success. Anyone know what's going on? Why might it occur today?
回答1:
It seems that you are attempting to install Ruby 2.1, but this issue is solved in Ruby 2.1.1 & higher as explained here.
SSL_OP_MSIE_SSLV2_RSA_PADDING has been removed from latest snapshot of OpenSSL 1.0.1. [Fixes GH-488]
Further details here in the official Ruby repository:
Mon Jan 27 16:45:34 2014 Yamashita Yuu
- ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant OP_MSIE_SSLV2_RSA_PADDING only if the macro is defined. The SSL_OP_MSIE_SSLV2_RSA_PADDING has been removed from latest snapshot of OpenSSL 1.0.1. [Fixes GH-488]
来源:https://stackoverflow.com/questions/23771910/ruby-2-1-fails-to-install-due-to-openssl-error