troubles with RVM and OpenSSL

烂漫一生 提交于 2019-11-28 18:52:18

Try this:

rvm get head
rvm pkg remove
rvm requirements run  # if brew gives you warnings about formulas to install, run "brew install" for each before moving on.

rvm reinstall [the version you need (i.e: 2.0.0)]

OP actually saved my day! In my case:

$ rvm pkg install openssl
$ rvm remove 2.4
$ rvm install 2.4 --with-openssl-dir=$HOME/.rvm/usr
$ gem install bundler

Installing Ruby 2.2 on macOS Mojave (10.14.2) with Homebrew.

Install Homebrew

brew install openssl
rvm install 2.2 --with-openssl-dir=/usr/local/opt/openssl

Don't use rvm pkg it's deprecated, use rvm autolibs enabled.

blazejmar

On MacOS 10.12.2 installing openssl via brew, won't work. To fix it, run:

export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/lib/pkgconfig

And then install Ruby via rvm.

EDIT: More information about the reason behind the problem here.

It's well described on ArchLinux wiki:

Ruby versions older than 2.4 require OpenSSL 1.0 but RVM will try to build them with OpenSSL 1.1.

So you can do (easiest):

$ rvm pkg install openssl
$ rvm reinstall 2.3.5 --with-openssl-dir=$HOME/.rvm/usr

You can see more solutions on ArchLinux wiki.

So this worked for me:

rvm pkg install openssl
rvm reinstall all --force

I also had rvm autolibs rvm_pkg for readline support.

openssl version: 1.0.2k

This worked for me:

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