Ruby 2.1 fails to install due to OpenSSL error

删除回忆录丶 提交于 2020-01-02 11:01:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!