- Uninstall and install
openssl
version 1.0.2. Asopenssl
v1.0.2 is no longer available, I have extractedopenssl
v1.0.2 and make it available at https://github.com/khun84/homebrew-repo/
brew uninstall --force --ignore-dependencies openssl
brew install khun84/homebrew-repo/openssl
brew cleanup # in case it fails due to permission denied, it can be due to the symlink to be removed is pointing to a non-exist file/directory. Just create the corresponding file or directory and run this command again
-
After OpenSSL installation, check it using
pkg-config --libs openssl
. You should see something like-L/usr/local/Cellar/openssl/1.0.2t/lib -lssl -lcrypto
-
Remove your rvm ruby 2.3.1 if you have not by
rvm remove 2.3.1
-
Install rvm ruby 2.3.1 by
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig rvm reinstall 2.3.1 --with-openssl-lib=/usr/local/opt/openssl --with-openssl-include=/usr/local/opt/openssl/include/openssl
. Verify you have the directory specified byPKG_CONFIG_PATH
,--with-openssl-lib
and--with-openssl-include
before you run this command! Otherwise you will need to redo Step 3 and Step 4 again.
- If it still doesn't work, may try
brew switch openssl 1.0.2t
. Here I already have openssl version1.0.2t
installed
There's another fix from SO by just changing the file symlink target, provided the openssl 1.0.2t already installed. Might need to install this openssl version again if brew remove it during brew update.
Reference: