Brew update breaks openssl


today I tried to install a new Ruby version through RVM, which triggered a brew update where a new openssl@1.1 version was installed and now I am unable to:

reinstall an old version of Ruby through RVM $ rvm reinstall 1.8.7-p374 does not work and throws:
Error running 'env CFLAGS=-I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl@1.1/include -O2 -fno-tree-dce -fno-optimize-sibling-calls LDFLAGS=-L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl@1.1/lib ./configure --prefix=/Users/MyAccount/.rvm/rubies/ruby-1.8.7-p374 --without-tcl --without-tk --disable-install-doc --enable-shared', please read /Users/MyAccount/.rvm/log/1578049283_ruby-1.8.7-p374/configure.log There has been an error while running configure. Halting the installation.

run Rails $ rails s does not work and throws:
[~]$ rails s /Users/MyAccount/.rvm/rubies/ruby-x/lib/ruby/x/..../openssl.bundle: dlopen(/Users/MyAccount/.rvm/rubies/ruby-x/lib/ruby/x/..../openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError) Referenced from: /Users/MyAccount/.rvm/rubies/ruby-x/lib/ruby/x/..../openssl.bundle/openssl.bundle Reason: image not found - /Users/MyAccount/.rvm/rubies/ruby-x/lib/ruby/x/..../openssl.bundle/openssl.bundle

I had to copy the content from /usr/local/Cellar/openssl/1.0.2q into /usr/local/Cellar/openssl@1.1/1.1.1d but that is not ideal.

I have added more details in a question on stackoverflow: Brew update breaks openssl

What did happen? How can I get the updated version of openssl to work?


brew doesn’t install rvm, so I’m not sure what the two have to do with each other.

There is no more openssl 1.0 available from Homebrew. Ruby 1.8.7 definitely needs it. Maybe there’s an answer for you here:

Dear @gfguthrie thanks a lot for your answer. It pointed me into the right direction.

The point is that I had two different development systems with the same stack and the same tools installed (Homebrew, RVM, Ruby). But only on my Mac Pro the system broke after a brew update or brew upgrade.

I managed to find the culprit: the homebrew symlink for openssl was rerouted to openssl@1.1 instead of openssl. I recreated the openssl and a openssl@1.0 link and now everything works as before.

Maybe you can help me out for the future … to my knowledge Homebrew is a packagemanger which installs into usr/local, where Homebrew resides in usr/local/Homebrew and all the compiled applications in usr/local/Cellar. The symlinks to the active version of an application are written to usr/local/opt. I than can use a link to the opt directory in order to use the brew installed version instead of a system version for example.

Would that be appropriate for a basic knowledge?

Is there any place else where Homebrew writes data?

Thanks to your hint my dev system works again, but I still do not understand why the symlink for openssl was rerouted too and not only the one for openssl@1.1.

Is it right that I should look into the relative recipe?

Thanks again! In case you are interested and answer my stackoverflow question I will be more than happy to upvote it.

It’s because openssl doesn’t exist unversioned anymore. 1.0 has been deprecated and removed from homebrew.

Thanks @SMillerDev for your reply. I know 1.0 has been deprecated, but for a legacy dev environment I still need it.

Do you know why the generic openssl symlink has been overwritten on one system but not on the other system?

Is that normal behavior and intended?

I’d say pinned versions could have something to do with it since upstream the openssl formula doesn’t exist anymore.

I'm not an educated man, you know that, but I think I had a similar problem. I use rbenv 
instead of rvm. I fixed my development-environment by uninstalling rvm and installing 

rvm = ruby version manager
rbenv = ruby environment.

I might not know what I am talking about.