Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downgrade to OPENSSL version 1.0 from 1.1 on mac

I have ruby version 2.1.5 installed on my system.

On running bundle install, I am getting "Could not load OpenSSL. You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at http://rvm.io/packages/openssl."

My Gemfile has soures with http only.

On executing "rvm pkg install openssl" : ==> Formulae curl-openssl glib-openssl [email protected] ✔ homebrew/portable-ruby/portable-openssl

There is no [email protected] and openssl

How to degrade to [email protected] from 1.0.

Already tried rvm reinstall 2.1.5 --with-openssl-dir=brew --prefix [email protected] But it is of no use for me.

like image 616
RB19 Avatar asked Dec 03 '19 11:12

RB19


People also ask

Does macOS use OpenSSL?

macOS has shipped with OpenSSL preinstalled since 2000. You can download a binary distribution of OpenSSL.

How do I remove old OpenSSL?

In this case, cd into openssl-1.1. 0 (where you built the library), and then do a sudo make uninstall. Follow that with a sudo rm -rf /usr/local/ssl and most cruft should be cleared.


2 Answers

I've seen this issue on rvm project where you can find more detail about this.

This step works for me, we have to wait for some official fix.

  1. Install openssl via rvm pkg install openssl
  2. Remove and reinstall rubies with rvm reinstall 2.1.5 --with-openssl-dir=$HOME/.rvm/usr
like image 80
Horacio Avatar answered Sep 18 '22 05:09

Horacio


The previous solution doesn't work any more, I have succeeded with the following steps:

brew install rbenv/tap/[email protected]
ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl
like image 20
Gong Pengjun Avatar answered Sep 20 '22 05:09

Gong Pengjun