简体   繁体   English

由于未声明SSL_OP_MSIE_SSLV2_RSA_PADDING,因此无法通过RBEnv安装Ruby 1.9.3-p194

[英]Cannot install Ruby 1.9.3-p194 via RBEnv due SSL_OP_MSIE_SSLV2_RSA_PADDING undeclared

I try to install Ruby on a clean server. 我尝试在干净的服务器上安装Ruby。

Server was a Debian 6.0.9 which I upgraded to Debian 7.5 服务器是Debian 6.0.9,我已升级到Debian 7.5

I've installed RBEnv with build-support via apt-get install. 我已经通过apt-get install安装了带有构建支持的RBEnv。

When I try to install Ruby 1.9.3-p194 (summed in the list via ruby-build --definitions), I got an error the installation failed. 当我尝试安装Ruby 1.9.3-p194(通过ruby-build --definitions汇总在列表中)时,出现错误,安装失败。

When I check the error in the log file, I got next error: 当我检查日志文件中的错误时,出现下一个错误:

make[2]: Entering directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
compiling ossl_pkey_rsa.c
compiling ossl_asn1.c
compiling callback-4.c
compiling ossl_x509.c
compiling ossl_pkcs5.c
compiling ossl_x509crl.c
compiling ossl_rand.c
compiling ossl_pkey_dsa.c
compiling ossl_x509cert.c
compiling ossl_ssl_session.c
compiling ossl_config.c
compiling callback-5.c
compiling ossl_engine.c
compiling ossl_pkey_ec.c
compiling ossl_bn.c
compiling ossl_x509name.c
compiling ossl_ssl.c
ossl_ssl.c: In function 'Init_ossl_ssl':
ossl_ssl.c:1982:5: error: 'SSL_OP_MSIE_SSLV2_RSA_PADDING' undeclared (first use in this function)
ossl_ssl.c:1982: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 `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling callback-6.c
compiling callback-7.c
compiling callback-8.c
linking shared-object dl/callback.so
make[2]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194/ext/dl/callback'
make[1]: Leaving directory `/tmp/ruby-build.20140610073619.8858/ruby-1.9.3-p194'
make: *** [build-ext] Error 2

I've installed/updated the openSSL version (OpenSSL 1.0.1e 11 Feb 2013) and installed libssl-dev, but the error stays. 我已经安装/更新了openSSL版本(OpenSSL 1.0.1e,2013年2月11日)并安装了libssl-dev,但错误仍然存​​在。

Anyone an idea what I'm missing to have SSL_OP_MSIE_SSLV2_RSA_PADDING declared? 有人知道我想声明SSL_OP_MSIE_SSLV2_RSA_PADDING吗? Is this an error in the Ruby-installation, or do I have a setup issue somewhere else? 这是Ruby安装中的错误,还是我在其他地方遇到了安装问题?

All advice is welcome :) 欢迎所有建议:)

(I already spend some time googling this, search on lot of sites, I guess I'm looking for the wrong solutions..) (我已经花了一些时间在Google上进行搜索,在许多站点上进行搜索,我想我正在寻找错误的解决方案。)

-- Edit: I found Ruby 2.1 fails to install due to OpenSSL error where it said the macro is removed in latest OPEN_SSL, does this mean I cannot use Ruby 1.9.x anymore? -编辑:我发现Ruby 2.1由于OpenSSL错误而无法安装 ,它说在最近的OPEN_SSL中删除了宏,这是否意味着我不能再使用Ruby 1.9.x? When I list ruby versions available via rbenv, no stable ruby 2 is listed + I prefer to keep using Ruby 1.9. 当我列出可通过rbenv获得的红宝石版本时,没有列出稳定的红宝石2 +我更喜欢继续使用Ruby 1.9。 Should I downgrade open_ssl (not wise idea) or ? 我应该降级open_ssl(不明智的主意)还是?

It looks like the define was dropped sometime after 1.0.1e-2+deb7u6, certainly is not present in 1.0.1e-2+deb7u10. 似乎在1.0.1e-2 + deb7u6之后的某个时间删除了定义,但在1.0.1e-2 + deb7u10中肯定不存在。

I worked around this by adding 我通过添加解决此问题

#define SSL_OP_MSIE_SSLV2_RSA_PADDING           0x00000040L /* no effect since 0.9.7h and 0.9.8b */ 

back to /usr/include/openssl/ssl.h. 返回到/usr/include/openssl/ssl.h。 (Picked from 1.0.1e-2+deb7u6) (摘自1.0.1e-2 + deb7u6)

Do at your own risk, I have not investigated what will happen if that value is passed. 这样做的后果自负,我尚未调查如果超过该值会发生什么情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM