Linux RVM 安装 Ruby 2.x 失败的解决办法

打开安装 log 文件,如果你发现类似这样的报错:

error: ‘ERR_get_error_line_data’ is deprecated: Since OpenSSL 3.0

那么说明是你的系统的 openssl 版本太新,我们需要安装一个旧版 openssl,但不能覆盖新版。

命令如下:

rvm pkg install openssl
rvm reinstall 2.7.6 --with-openssl-dir=/usr/local/rvm/usr/ 

此处的 /usr/local/rvm/usr/ 目录你需要调整为你的 rvm 存储目录,这里目录里面应该有类似 bin include lib ssl 之类的目录,具体位置请搜一下。

完。

猜你喜欢

转载自juejin.im/post/7240751116702793765