试图在IntelMac11.2.3上安装Ruby2.7.4&Ruby3,我在编译过程中看到了以下错误(使用ruby-install (https://github.com/postmodern/ruby-install)安装)。我看到以下错误:
^
ossl_pkey_rsa.c:942:5: error: use of undeclared identifier 'RSA_SSLV23_PADDING'
DefRSAConst(SSLV23_PADDING);
^
ossl_pkey_rsa.c:877:58: note: expanded from macro 'DefRSAConst'
#define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))
^
<scratch space>:144:1: note: expanded from here
RSA_SSLV23_PADDING
^
107 warnings and 1 error generated.
make[2]: *** [ossl_pkey_rsa.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 2.7.4 failed!此外,青年联合会:
❯ openssl version
LibreSSL 2.8.3发布于 2021-10-27 17:06:43
ruby-install负责为您安装OpenSSL依赖项,但是ruby-install中有一个错误,它没有指定需要安装的确切的openssl版本。谢天谢地,这个问题已经解决了:
将ruby-install ruby 3.0.2)
ruby-install升级到>=0.8.3 (例如brew upgrade ruby-install),它将ruby的openssl依赖项固定在1.1详细信息:
这一问题在ruby-install中得到了解决(https://github.com/postmodern/ruby-install/issues/409首次报道)。openssl默认为3.0 (最新的主要版本),但还没有增加对OpenSSL3.0的支持。因此,openssl依赖关系ruby-install试图使用的版本是错误的(ruby-install仍然使用1.1版本)。
发布于 2022-01-07 20:32:32
为了将来的参考,如果有人面临与rvm类似的问题,只需使用brew卸载openssl@3,然后安装openssl@1.1
https://stackoverflow.com/questions/69510334
复制相似问题