尝试在 Intel Mac 11.2.3 上安装 Ruby 2.7.4 和 Ruby 3,我在编译过程中看到以下错误(安装时使用ruby-install( https://github.com/postmodern/ruby-install ) 安装。我看到以下错误:
^\nossl_pkey_rsa.c:942:5: error: use of undeclared identifier \'RSA_SSLV23_PADDING\'\n DefRSAConst(SSLV23_PADDING);\n ^\nossl_pkey_rsa.c:877:58: note: expanded from macro \'DefRSAConst\'\n#define DefRSAConst(x) rb_define_const(cRSA, #x, INT2NUM(RSA_##x))\n ^\n<scratch space>:144:1: note: expanded from here\nRSA_SSLV23_PADDING\n^\n107 warnings and 1 error generated.\nmake[2]: *** [ossl_pkey_rsa.o] Error 1\nmake[1]: *** [ext/openssl/all] Error 2\nmake: *** [build-ext] Error 2\n!!! Compiling ruby 2.7.4 failed!\nRun Code Online (Sandbox Code Playgroud)\n另外,仅供参考:
\n\xe2\x9d\xaf openssl version\nLibreSSL 2.8.3\nRun Code Online (Sandbox Code Playgroud)\n
whi*_*kid 12
仅供将来参考,如果有人遇到类似的情况,rvm只需使用brew卸载openssl@3并安装openssl@1.1
如果您已经使用rvm安装 ruby 版本并已openssl@3安装,则可以通过运行以下命令来修复它:
rvm install 3.2.2 --with-openssl-dir=$(brew --prefix openssl@3)
Run Code Online (Sandbox Code Playgroud)
如果您还没有openssl@3安装,可以使用以下命令安装:
$ brew install openssl@3
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5059 次 |
| 最近记录: |