dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Solution 1
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...
Solution 2
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)
Solution 3
brew switch openssl 1.0.2s
worked for me on "macOS Mojave", "version 10.14.6".
Solution 4
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)
.
Solution 5
first, list the details of the installed openssl version(or other programs) by:
$ls -al /usr/local/Cellar/openssl*
/usr/local/Cellar/openssl:
total 0
drwxr-xr-x 3 mba staff 96 Nov 30 17:18 .
drwxrwxr-x 170 mba admin 5440 Apr 8 02:03 ..
drwxr-xr-x 13 mba staff 416 Nov 21 03:13 1.0.2t
/usr/local/Cellar/[email protected]:
total 0
drwxr-xr-x 4 mba staff 128 Apr 7 18:35 .
drwxrwxr-x 170 mba admin 5440 Apr 8 02:03 ..
drwxr-xr-x 14 mba staff 448 Oct 1 2019 1.1.1d
drwxr-xr-x 14 mba staff 448 Apr 7 18:35 1.1.1f
as above output, there are only one "right" versions "openssl" in my mac. then, switch to it:
$brew switch openssl 1.0.2t
Cleaning /usr/local/Cellar/openssl/1.0.2t
Opt link created for /usr/local/Cellar/openssl/1.0.2t
Cronay
Updated on July 12, 2022Comments
-
Cronay almost 2 years
I installed vapor via homebrew and then immediately wanted to jump into a project by executing
vapor new Hello
but then got the following message back in the terminal:dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/bin/vapor Reason: image not found zsh: abort vapor new Hello
I tried some approaches to fix this like uninstalling and reinstalling openssl via brew but that didn't work . Also tried something I found in the internet but nothing worked. I assume it has something to do with vapor only working with version 1.0.0 but not 1.1.1 and that's what I have. I guess I need to downgrade to 1.0.0 but how'd I do that? I'm on MacOS Catalina if that matters.
-
tom10271 over 4 yearsbrew update && brew upgrade will upgrade all packages, it causes HUGE problem
-
tom10271 over 4 yearsThis is the best solution and simplest. Yet Homebrew will remove packages that are deprecated. Not sure when will this solution stop working
-
Aman Raheja over 4 yearsYou know, you are a diamond
-
macool over 4 yearsyeah please remove
brew upgrade
from the answer @michal-cichon -
Cronay over 4 years@Leopathu can you elaborate why this should be the approved answer and not the one I approved? If this is the better answer I still can approve it.
-
Ishmael7 over 4 yearsThis one worked for me because I required a version of openssl which contained libssl.1.0.0.dylib. The latest version of openssl contains libssl.1.1.dylib.
-
juanitourquiza over 4 yearsThis work for me with a little change the last letter "r" brew switch openssl 1.0.2r on MacOS Catalina
-
Gold Chicken over 4 yearsbest solution. brew switch openssl 1.0.2t in my case
-
flurdy over 4 yearsI just upgraded the client tool, not vapor but wget in my case. Which then used a later version of openssl
brew upgrade vapor
-
Isaac Philip about 4 yearsThanks my Tableau 2019.10.3 was not opening in Mac OS Mojave and this command helped solve that!
-
Zheden about 4 years@MichalCichon could you please explain what is the vapor? "which vapor" gives me empty result and command cannot be executed
-
Michal Cichon about 4 years@Zheden Vapor is a web framework implemented in Swift. Please take a look at the original question in this thread. If you don't know what Vapor is then this thread probably doesn't answer your question. If you use Homebrew to manage your dependencies, try Smokie's answer.
-
Michal Cichon about 4 yearsThanks @musafar006. I didn't notice I copied a wrong path in the second command.
-
Evhz about 4 years
brew switch openssl 1.0.2p
-
Uncle Long Hair about 4 yearsthank you I can't imagine how much time you must have saved me. My openssl broke after upgrading my Mac to Catalina.
-
ricks about 4 yearsI had to upgrade and update brew before this worked
-
Gonzalo Garcia about 4 yearsWhy @Cronay is this still the correct answer? can u changed to the most voted ?
-
Cronay about 4 yearsIf you make a good argument, I do it. What's bettwr about that answer than this the approved one? I once asked this and nobody answered me, so I left it as it is.
-
AntonAL about 4 yearsIt works for me (macOS Catalina, ruby 2.4.1, rails 5.2.2, openssl 1.1.1f). Switched to 1.0.2s.
-
squarecandy about 4 yearsI felt like @smokie deserved the upvote for being there first with the right approach vs. all of the other answers that just say which +1 letter version number worked for their exact setup...
-
Taher about 4 years@Cronay, although the question involved vapor and this answer's approach has solved it for you. I am sure, many others like me, came here after a certain setup stopped working due to an OS upgrade (in my case it was PHP7.2, after upgrading to Catalina, it suddenly stopped working and produced an error like in the title) - which means this question helped many many others - and that is great :)
-
Cronay about 4 years@Smokie And what technical advantages has the most voted solution in comparison?
-
Taher about 4 years@Cronay, the marked answer solves an issue involving vapor, my answer solves the issue mentioned in the title (not being able to load the openssl library). both are correct answers in my opinion.
-
techturbulence about 4 yearsOn my High Sierra 10.13.6
brew switch openssl 1.0.2t
worked -
Martynas Jurkus about 4 yearsI spent a whole day installing, reinstalling rails versions, mysql2 gems with various flags and options. This worked like a charm! Thanks mate!
-
Tony Dinh about 4 yearsGuys from Google, the actual answer is here.
-
Inanc Gumus about 4 years
brew switch openssl 1.0.2s
worked for me on Catalina. -
calebisstupid about 4 yearsjust stopping to say thanks. i had done all sorts of weird stuff trying to get a one off project building and this solved my issues
-
Salx about 4 yearsthankyouthankyouthankyou! worked here with 1.0.2r. On High Sierra.
-
michaelsking1993 almost 4 yearsWow. I thought I was screwed until I found this. Ran a series of commands to install Python/Flask, then all my RSpec tests were failing. Thank you...
-
Sebastian Korotkiewicz almost 4 years
brew switch openssl 1.0.2t
Work for me on "macOS Mojave" -
Petrus Theron almost 4 yearsThanks,
brew switch openssl 1.0.2r
fixed my `psql install on OSX (I use PostgresApp). -
Krzysztof Bociurko almost 4 yearsSimplest solution, openssl was in a correct and up to date version, but the stuff that crashed needed to be updated.
-
FloG almost 4 yearsFixed it for me.
-
AlxVallejo almost 4 years
invalid option: --upgrade
-
kthornbloom almost 4 yearssaved my bacon!
-
iwind almost 4 yearsbrew switch openssl 1.0.2r works for me, thank you. and 'ls -al /usr/local/Cellar/openssl' is the key.
-
David Mann almost 4 yearsThanks so much for this. What shows that 1.0.2t is the "right" version? I have a 1.0.2r and a 1.1.1d and 1.1.1f.
-
user3325025 almost 4 yearssimilar works for me on macos high sierra 10.13.6 python3.6
-
Don't Panic almost 4 years
there are only one "right" versions
- what does this mean? How do you tell? -
little tiny man almost 4 yearsI don't even fully understand this issue but this worked for me
-
Shane Fontaine over 3 yearsThis worked for me on August 4th, 2020. As a note, the original, accepted answer had worked for me on July 16th, 2019 but did not work today.
-
Justin Meskan over 3 yearsvery good this worked for me.. when all the rest failed..lol thanks
-
Anna Costalonga over 3 yearsthis hint saved me hours and hours, great advice for Mac users!
-
Tom Pace over 3 yearsI've just begun having problems with brew; and coming here and getting a holistic take on the behaviours... Am I alone in thinking brew is reducing as a valuable project? If it removes deprecated content, and I'm using various systems with dependencies that are merely a couple years old, and dependencies are dropped... If to resolve issues, the solutions require a manual investment in seeking sources and making... kinda makes the value of being a dependency manager moot. I need to talk in a community forum about this issue.
-
Kevin Ford The Submariner over 3 yearsI agree with your concerns @Jerry and I hit upon what I think may have been a quicker solution than yours using MichalCichon's answer as a starting point. Good idea to rebuild from sources rather than downgrade your openssl lib version, but I'm guessing you know already that can be an extremely time-consuming process. Thanks for posting your answer.
-
Johhn over 3 years
brew uninstall --ignore-dependencies openssl brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rb
-
Travis Spencer over 3 yearsIf this works for you, you should consider yourself lucky. The API between 1.0 and 1.1 was pretty different and most things that depend on 1.1 will not work with 1.0.
-
Ryzal Yusoff over 3 yearsFor me on Catalina this is working:
brew switch openssl 1.0.2j
-
yegor256 over 3 yearsWhat should I do if I don't have any "older" versions installed on my Mac, but just 1.1.1g?
-
RaphaelDDL over 3 yearsI'm getting
Error: openssl not found in the Cellar.
when trying to switch, any ideas? -
Babbz77 over 3 yearsWhen running
ls -al /usr/local/Cellar/openssl
did anyone getls: /usr/local/Cellar/openssl: No such file or directory
? -
Andreas Ley over 3 yearsThat was the only solution that did the trick for me. Additionally, I had to create a link so that Vapor would find it:
ln -s /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl
-
Tarantula over 3 yearsSame here, probably after an upgrade of homebrew it removed it.
-
AlxVallejo over 3 yearsNo available formula or cask with the name "[email protected]"
-
AlxVallejo over 3 yearsCalling Installation of openssl from a GitHub commit URL is disabled! Use 'brew extract openssl' to stable tap on GitHub instead.
-
AlxVallejo over 3 yearsError: openssl not found in the Cellar
-
abbood over 3 yearsError: Calling Non-checksummed download of openssl formula file from an arbitrary URL is disabled! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead. If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): github.com/tebelorg/Tump/issues/new
-
abbood over 3 yearsbrew search openssl ==> Formulae curl-openssl ✔ glib-openssl [email protected] homebrew/portable-ruby/portable-openssl only 1.1 is available now
-
juanitourquiza over 3 yearsThis worked for me in October 2020. My project uses Symfony 5
-
juanitourquiza over 3 yearsThis worked for me in October 2020. My project uses Symfony 5
-
Soyaine over 3 years@yegor256 how about
ls -al /usr/local/Cellar/openssl*
? -
AlxVallejo over 3 years@Soyaine That just gives me the latest 1.1.1g
-
Tchakabam over 3 yearsi don't think it is a good idea to downgrade a security relevant component as this.
-
AlxVallejo over 3 yearsno such file or directory: /usr/local/opt/openssl/lib/
-
lucasarruda over 3 yearsAs Andreas stated, you still have to symlink. But Andreas command is backwards. It should actually read
ln -s /usr/local/opt/openssl /usr/local/Cellar/[email protected]/1.0.2t
-
lucasarruda over 3 yearsI think this is the correct solution. I did this a couple of times and it worked. I just forgot about it and end up here. So, just confirming this is a good solution that is future proof. Just make sure you create the exact erring lib version (1.0.0, 1.0.1, or 1.0.2), depending on the error you are getting.
-
allenski over 3 yearsPlease share code with your answer and link at end for reference. want to avoid link-only answers in case that page stops working or changes.
-
Joshua Pinter over 3 yearsThis fixed it for me. Thanks.
-
Darwin Harianto over 3 yearsTo install that GitHub link, we need to downgrade brew.
cd /usr/local/Homebrew/
change to version 2.3.0git checkout 2.3.0
then installHOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
github.com/kelaberetiv/TagUI/issues/635#issuecomment-699482920 -
Chris Edwards over 3 yearsThis fixed it for me too, however the first time I ran it it did not. I had to
brew uninstall postgresql@12
then re-runbrew postgresql-upgrade-database
which fixed it. -
Janosch over 3 yearsor
brew tap cartr/qt4 && brew install cartr/qt4/[email protected]
-
Ignacio over 3 yearsthis worked for me, nov 2020 using "get github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb"
-
Randomtheories over 3 yearsWorked. Just manually downloaded the file.
-
Lucas C. Feijo over 3 yearsThis worked for me, but you have to do --ignore-dependencies.
-
Lance Cleveland over 3 yearsBrew on MacOS no longer supports OpenSSL 1.0.X -- you'll need to manually fetch the older brew core from git, checkout the commit, and install the older openSSL libs from there. See izziswift.com/openssl-1-0-2m-on-macos
-
Tracy McCormick over 3 yearsjust a fyi I tried the wget but got the following dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/bin/wget Reason: image not found Abort trap: 6
-
kawingkelvin over 3 yearsI have python3.8 that use openssl 1.1 and another virtualenv on python 3.7 that used openssl1.0. While brew install, it must have deleted openssl1.0. If i brew reinstall the old version and use "switch", would it break the python3.8 venv?
-
Moshe D over 3 yearsWow people should look for this, this on the only that helped me!!
-
chris over 3 years
brew install rbenv/tap/[email protected]
took forever! But finally a solution that worked for me using macOS Big Sur, thanks @angabriel! -
Parth Tamane over 3 yearsWas facing the same issue when running
sudo gem install cocoapods
. This helped, thanks! -
deyvw over 3 years"brew switch" is already disabled. So what then?
-
chifu lin over 3 yearsThis solution that worked for me using macOS Big Sur, thanks
-
chompy over 3 yearsWorked on macOS Mojave fyi, thank you for the workaround!
-
frakman1 about 3 yearsThis worked for me on High Sierra with
/usr/local/Cellar/mysql/5.7.20/bin/mysqld
-
Maurits about 3 yearsWorked for me as well! Thank you!
-
iCyborg about 3 years@LucasC.Feijo can you give the full command with --ignore-dependencies?
-
Lucas C. Feijo about 3 years@iCyborg --ignore-dependencies is a parameter to the brew binary, so you'd call it like
brew install nameOfPackage --ignore-dependencies
-
tigeruppercut about 3 yearsThank you. I was stuck for 2 days.
-
angabriel about 3 yearsDid you read my answer? It states that I also tried
brew switch
and downgrading. "I tried the below solution"... Over time things did change. The accepted answer cannot be not valid forever when not updated. Also creating symlinks is better than copying around systemfiles. -
Ecuador about 3 yearsMacOS 11.2.3, worked like a charm, thanks!
-
Bart Jonk about 3 years@deyvw: check out the answer below:
brew install rbenv/tap/[email protected]
|ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl
-
Taher about 3 yearsMy (this) answer has become outdated,
brew switch
got disabled, openssl 1.* wouldn't be installed out of the box nowadays. I suggest moving the correct answer to the one below (by @angabiel) -
Anthony about 3 years@BartJonk you should pull that out into its own answer, that's the correct approach
-
AppDever almost 3 yearsHours and hours trying to install cocoapods and I came across this and was hopeful as I too have an M1 with Big Sur but this did not work for me.... I get this: x86_64cpuid.s:273:10: error: unknown token in expression cmpq $0,%rax (with a ^ pointing to the %)
-
user2233949 over 2 years@Bart Jonk I agree with Anthony. That should be in its own answer. In 2021, that's the only thing that worked for me after trying a lot of different approaches
-
Brad Johnson over 2 yearsFor all the other solutions, brew seemed to need git (which is what was not working for me). This is the only solution I found that downloads files and installs them without git.
-
Dan In Van over 2 yearsWorked in Sept. 2021 on Mojave (the only thing that worked).
-
Ole Spaarmann over 2 yearsWhen trying to install [email protected] on macOS 12.1 Monterey on a MacBook M1 the make command fails. Does anyone have a solution for that?
-
Pradeep shyam about 2 yearsThis worked well for Macos Monterey as well :)
-
Ovi Trif about 2 yearsTo inform newcomers here, this doesn't work on M1 with a arm64 build of
brew
-
fguillen about 2 yearsWorks for me in MacOS Catalina 10.5.5
-
wbr almost 2 yearsAfter searching for a couple of hours to a solution for broken 'heroku pg:psql' on Mac Mojave with Homebrew, this is the only solution that helped. Thank you!