dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

brew switch openssl 1.0.2s

worked for me on "macOS Mojave", "version 10.14.6".


Update: As of December 2020 and beyond, brew switch does not work, so use the other answer by @angabriel:

brew install rbenv/tap/[email protected]
ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl

Original Answer: Switch to an older openssl package

brew switch openssl 1.0.2s

Or, depending on your exact system configuration, you may need to switch to a different version. Check the output of ls -al /usr/local/Cellar/openssl for the version number to switch to.

brew switch openssl 1.0.2q
# or
brew switch openssl 1.0.2r
# or 
brew switch openssl 1.0.2s
# or
brew switch openssl 1.0.2t
# etc...

December 2020 This thread has many answers, but none worked for me.
The top answer also suggests a downgrade:

brew switch ... throws Calling brew switch is disabled!

this worked for me:

brew install rbenv/tap/[email protected]
ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl

found here: https://github.com/kelaberetiv/TagUI/issues/86
(I need to run old mongodb 3.4 on OSX 10.13.x)


Try to use install_name_tool:

sudo install_name_tool -change /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/libssl.1.1.dylib $(which vapor)
sudo install_name_tool -change /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/libcrypto.1.1.dylib $(which vapor)

In my case it start working when I used install_name_tool. The order of the parameter is following: old value (incorrect), then new value (where you have your openssl) and the path to vapor (which can be easily get by $(which vapor).