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

43

464

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.

Wages answered 23/11, 2019 at 10:21 Comment(5)
Support for OpenSSL 1.1 was added to Vapor: github.com/vapor/open-crypto/pull/75Mike
This might be helpful for others: <https://mcmap.net/q/21826/-dyld-library-not-loaded-usr-local-opt-openssl-lib-libcrypto-1-0-0-dylib>Vortumnus
I used this method to fix /usr/local/bin/wget (that was exposed by plenv install-cpanm)Septet
Only this manual fix works for me: programmersought.com/article/30292378091Detain
An answer to a similar question about Postgres and pg_dump may solve this issue too!Insinuating
C
1048

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...
Crustaceous answered 4/12, 2019 at 20:38 Comment(32)
This is the best solution and simplest. Yet Homebrew will remove packages that are deprecated. Not sure when will this solution stop workingDeafanddumb
@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.Wages
This 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.Unadvised
This work for me with a little change the last letter "r" brew switch openssl 1.0.2r on MacOS CatalinaRegistrar
best solution. brew switch openssl 1.0.2t in my caseLinzy
thank you I can't imagine how much time you must have saved me. My openssl broke after upgrading my Mac to Catalina.Anticlockwise
I 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...Omnivore
On my High Sierra 10.13.6 brew switch openssl 1.0.2t workedLaflamme
just stopping to say thanks. i had done all sorts of weird stuff trying to get a one off project building and this solved my issuesBonbon
thankyouthankyouthankyou! worked here with 1.0.2r. On High Sierra.Norfolk
Wow. 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...Gaylor
brew switch openssl 1.0.2t Work for me on "macOS Mojave"Olivaolivaceous
Thanks, brew switch openssl 1.0.2r fixed my `psql install on OSX (I use PostgresApp).Microelement
brew switch openssl 1.0.2r works for me, thank you. and 'ls -al /usr/local/Cellar/openssl' is the key.Craftwork
I don't even fully understand this issue but this worked for meOsmen
I'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.Frey
What should I do if I don't have any "older" versions installed on my Mac, but just 1.1.1g?Lane
I'm getting Error: openssl not found in the Cellar. when trying to switch, any ideas?Dioecious
When running ls -al /usr/local/Cellar/openssl did anyone get ls: /usr/local/Cellar/openssl: No such file or directory?Kermie
Same here, probably after an upgrade of homebrew it removed it.Altercation
@Lane how about ls -al /usr/local/Cellar/openssl*?Globule
@Globule That just gives me the latest 1.1.1gCulinarian
i don't think it is a good idea to downgrade a security relevant component as this.Agenesis
Brew 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-macosIndican
I 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?Gibert
"brew switch" is already disabled. So what then?Mireyamiriam
@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/opensslStupa
My (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)Crustaceous
@BartJonk you should pull that out into its own answer, that's the correct approachCopenhaver
@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 approachesPremarital
When 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?Pain
On Apple Silicon, Homebrew packages are installed in /opt/homebrew and not /usr/local/opt. Can create a symlink to it using sudo ln -sfn /opt/homebrew/opt/[email protected] /usr/local/opt/[email protected]Plymouth
S
243

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)

Springfield answered 29/12, 2020 at 15:48 Comment(10)
brew install rbenv/tap/[email protected] took forever! But finally a solution that worked for me using macOS Big Sur, thanks @angabriel!Euchromatin
Was facing the same issue when running sudo gem install cocoapods. This helped, thanks!Rael
This solution that worked for me using macOS Big Sur, thanksMinister
Worked on macOS Mojave fyi, thank you for the workaround!Peterman
This worked for me on High Sierra with /usr/local/Cellar/mysql/5.7.20/bin/mysqldPetrography
MacOS 11.2.3, worked like a charm, thanks!Quesnay
Hours 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 %)Travertine
Worked in Sept. 2021 on Mojave (the only thing that worked).Appellant
This worked well for Macos Monterey as well :)Afternoons
After 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!Livingstone
C
100

brew switch openssl 1.0.2s

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

Cesarcesare answered 15/1, 2020 at 17:38 Comment(3)
Thanks my Tableau 2019.10.3 was not opening in Mac OS Mojave and this command helped solve that!Honeyed
brew switch openssl 1.0.2pSuperannuate
brew uninstall --ignore-dependencies openssl brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rbLeaseholder
M
82

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).

Mike answered 23/11, 2019 at 11:56 Comment(11)
brew update && brew upgrade will upgrade all packages, it causes HUGE problemDeafanddumb
You know, you are a diamondSeaton
yeah please remove brew upgrade from the answer @michal-cichonCerium
@MichalCichon could you please explain what is the vapor? "which vapor" gives me empty result and command cannot be executedChannel
@Channel 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.Mike
Thanks @musafar006. I didn't notice I copied a wrong path in the second command.Mike
Why @Wages is this still the correct answer? can u changed to the most voted ?Coadjutrix
If 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.Wages
@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 :)Crustaceous
@Smokie And what technical advantages has the most voted solution in comparison?Wages
@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.Crustaceous
A
75

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
Aniconic answered 7/4, 2020 at 18:26 Comment(4)
I spent a whole day installing, reinstalling rails versions, mysql2 gems with various flags and options. This worked like a charm! Thanks mate!Keene
Thanks 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.Kanter
there are only one "right" versions - what does this mean? How do you tell?Anastasiaanastasie
i can see only /usr/local/Cellar/[email protected]: /usr/local/Cellar/openssl@3: my macos version is 13.5.1Stated
J
59

For MacOS 10.15 Catalina try to install the previous openssl:

brew update && brew upgrade
brew uninstall --ignore-dependencies openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Jews answered 24/12, 2019 at 1:1 Comment(2)
Error: 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/newPar
To install that GitHub link, we need to downgrade brew. cd /usr/local/Homebrew/ change to version 2.3.0 git checkout 2.3.0 then install HOMEBREW_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-699482920Papilloma
S
53
brew switch openssl 1.0.2q

MacOs Catalina Version 10.15 worked for me

Spatiotemporal answered 7/2, 2020 at 13:18 Comment(3)
I had to upgrade and update brew before this workedVelocity
Error: openssl not found in the CellarCulinarian
brew search openssl ==> Formulae curl-openssl ✔ glib-openssl [email protected] homebrew/portable-ruby/portable-openssl only 1.1 is available nowPar
T
30

I had the same problem. I solved it by running these 2 commands:

brew uninstall vapor
brew install vapor/tap/vapor

It worked.

Tympan answered 5/12, 2019 at 16:27 Comment(1)
I just upgraded the client tool, not vapor but wget in my case. Which then used a later version of openssl brew upgrade vaporAlcinia
I
27
brew switch openssl 1.0.2r

it work for me,macOS Mojave, Version 10.14.6

Inexpressive answered 5/3, 2020 at 0:49 Comment(2)
It works for me (macOS Catalina, ruby 2.4.1, rails 5.2.2, openssl 1.1.1f). Switched to 1.0.2s.Reduplicative
similar works for me on macos high sierra 10.13.6 python3.6Hamstring
T
26
brew switch openssl 1.0.2t

catalina this is ok.

Traditor answered 9/1, 2020 at 8:46 Comment(1)
For me on Catalina this is working: brew switch openssl 1.0.2jFamilial
P
23

This is the only thing that worked for me (OSX Catalina 10.15.7)

1- Download the file:

wget https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

2 - Run brew with the file downloaded:

brew install openssl.rb
Par answered 11/10, 2020 at 14:22 Comment(4)
or brew tap cartr/qt4 && brew install cartr/qt4/[email protected]Paleopsychology
this worked for me, nov 2020 using "get github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb"Christi
Worked. Just manually downloaded the file.Goines
just 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: 6Oireachtas
T
19

This worked for me on my mac

brew switch openssl 1.0.2n

Thorncombe answered 8/1, 2020 at 13:3 Comment(1)
brew switch openssl 1.0.2s worked for me on Catalina.Abominate
A
17

i'll throw in my 2 cents because i didn't see an answer that resolved my issue.

my particular use case, relates to starting a legacy rails application using ruby 2.6.3 with postgres 10.x series.

  • i'm running macOS 10.13.x high sierra
  • i update brew almost on a daily basis, and the version of openssl i have is 1.1

haven't started the rails app in several months, needed to perform some maintenance on the app today and, got some lovely ❤ error messages below,

9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib

echo "and"

9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib
  Reason: image not found -

the quickest way to work around my particular issue was to create a smylink from the current,

libssl.1.1.dylib
libcrypto.1.1.dylib

create 2 symlinks

cd /usr/local/opt/openssl/lib/
ln -sf libcrypto.1.1.dylib libcrypto.1.0.0.dylib
ln -sf libssl.1.1.dylib libssl.1.0.0.dylib

paths and version numbers are obviously going to change over time so pay attention to the path and version numbers while creating the above symlinks. after the symlinks were created, i am able to start my rails app.

cheers

leaving this here for future me 👴🏼

Assign answered 21/7, 2020 at 18:13 Comment(3)
If 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.Food
no such file or directory: /usr/local/opt/openssl/lib/Culinarian
I 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.Ellen
D
13
brew reinstall openssl

It automatically updates mysql server compatible with openssl. I tried many things, but only this worked for me.

Desperate answered 13/7, 2020 at 15:58 Comment(2)
This fixed it for me. Thanks.Prophets
For 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.Rosio
T
13

If anyone is coming for [email protected] issue in MacOS Big Sur,(i.e. Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib, here's what solved it for me-

brew install [email protected]
ln -s $(brew --prefix)/opt/openssl/lib/libssl.1.1.dylib /usr/local/lib/
ln -s $(brew --prefix)/opt/openssl/lib/libcrypto.1.1.dylib /usr/local/lib
Thermoelectric answered 25/10, 2021 at 15:5 Comment(2)
To inform newcomers here, this doesn't work on M1 with a arm64 build of brewDrillstock
Works for me in MacOS Catalina 10.5.5Pacorro
S
12

I had a similar issue and running the command below fixed the error for me:

brew update && brew upgrade
Scintillant answered 14/5, 2020 at 17:38 Comment(3)
Simplest solution, openssl was in a correct and up to date version, but the stuff that crashed needed to be updated.Kanal
Fixed it for me.Birthplace
saved my bacon!Habited
W
11

I had to downgrade OpenSSL in this way:

brew uninstall --ignore-dependencies openssl
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rb

It was the only solution that worked for me.

Wealth answered 30/7, 2020 at 0:50 Comment(1)
Calling Installation of openssl from a GitHub commit URL is disabled! Use 'brew extract openssl' to stable tap on GitHub instead.Culinarian
R
10

Proposing brew update && brew upgrade as the solution is not a good answer and, as this error appears in most of the cases due the execution of this...

Switch to the previous version you were using with only: brew switch openssl XXX and that's it.

Rebuttal answered 6/2, 2020 at 17:36 Comment(1)
Guys from Google, the actual answer is here.Sarge
A
9

A simple brew update && brew upgrade did the trick for me

Acanthaceous answered 3/2, 2020 at 21:56 Comment(0)
C
8

Mehn this is me in July 7, 2020, after facing this error for 4 hours. This is the only command that worked for me:

brew update && brew upgrade

Candlemaker answered 9/7, 2020 at 19:47 Comment(2)
This 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.Ringleader
This worked for me in October 2020. My project uses Symfony 5Registrar
M
8

This worked for me:

brew uninstall openssl
brew tap-new $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
brew install [email protected]

Source: https://github.com/kelaberetiv/TagUI/issues/635#issuecomment-560138773

Menashem answered 8/9, 2020 at 15:32 Comment(6)
That 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/opensslImmingle
No available formula or cask with the name "[email protected]"Culinarian
As 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.2tEllen
This worked for me, but you have to do --ignore-dependencies.Indraft
@LucasC.Feijo can you give the full command with --ignore-dependencies?Peplum
@Peplum --ignore-dependencies is a parameter to the brew binary, so you'd call it like brew install nameOfPackage --ignore-dependenciesIndraft
B
7

If you are using ruby-2.7.0 on MacOS Catalina 10.15

$ brew reinstall [email protected]

or

$ rvm reinstall 2.7.0
$ brew tap --repair
$ brew doctor
Basilius answered 12/5, 2020 at 14:34 Comment(1)
this hint saved me hours and hours, great advice for Mac users!Demers
M
7

Had this issue when trying to use LastPass CLI via Alfred on my Catalina install.

brew update && brew upgrade fixed the issue.

This is a much better optin than downgrading openssl.

Metropolitan answered 12/7, 2020 at 5:44 Comment(1)
This worked for me in October 2020. My project uses Symfony 5Registrar
D
6

This might be a problem because of having the older version of brew and installed byobu which require new dependency in order to solve this problem run the following command

brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Damaging answered 15/1, 2020 at 17:39 Comment(0)
A
4

The above answers didn't work for me. I am on Big Sur 11.6 with Xcode 12.5.1 and the brew keeps giving me an error saying my command line tools are outdated. First step is to update Xcode to 13.0. Restart the machine, and then run the

brew install [email protected]

Restart the terminal and now re-run the command which was giving the following error:

dyld: Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib

Everything should work fine now, and you will not see the error message anymore.

Ariadne answered 11/10, 2021 at 23:13 Comment(0)
P
3

I had a similar issue and based on this and other comments here's what happened and worked:

➜ brew update && brew upgrade && brew install openssl
remote: Repository not found.
fatal: repository 'https://github.com/Homebrew/homebrew-dupes/' not found
Error: homebrew/homebrew-dupes does not exist! Run `brew untap homebrew/homebrew-dupes` to remove it.
...
➜ brew untap homebrew/homebrew-dupes
➜ brew update && brew upgrade && brew install openssl

This was after working on it for hours, but first time I saw the homebrew-dupes. Not sure how Homebrew knew what to install, but it seemed to install everything from scratch. macOS Catalina, zsh. I think the initial problem came because of Catalina

The error I was getting was:

dlopen(/Users/gscar/.gem/ruby/2.7.0/gems/pg-1.2.2/lib/pg_ext.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/postgresql/lib/libpq.5.dylib
  Reason: image not found - /Users/gscar/.gem/ruby/2.7.0/gems/pg-1.2.2/lib/pg_ext.bundle
Pancho answered 5/2, 2020 at 1:57 Comment(0)
B
3

If you don't have Homebrew or don't know what is it

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Or if you already have Homebrew installed

brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

This works for me on Mac 10.15

Bunkum answered 25/3, 2020 at 3:46 Comment(1)
very good this worked for me.. when all the rest failed..lol thanksDannettedanni
C
3

Above solution didn't work for me.

First run brew doctor. if you see something like

Error: unknown or unsupported macOS version: :mountain_lion

then there are some outdated packages which needs to be removed, mine was
mongodb.

It could be python@2, node@6 or some other package.

uninstall those packages brew uninstall [name] then run brew doctor to verify if everything is ok. Then you can reinstall those packages again after brew update && brew upgrade.

Crisper answered 20/7, 2020 at 14:35 Comment(0)
T
3

Explanation an solution: It seems that you're required to install older openssl version that is no longer exist on current brew repository ( 1.0.2t version ) . In order to solve it you should create a tap and extract an older version ( looking through repository history), after new installation create a link to this version and you're linked to the right version.

brew uninstall --ignore-dependencies openssl
brew tap-new $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
brew install [email protected]
ln -s /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/openssl

Documentation :

Taps (Third-Party Repositories) brew tap adds more repositories to the list of formulae that brew tracks, updates, and installs from. By default, tap assumes that the repositories come from GitHub, but the command isn’t limited to any one location.

 tap-new [options] user/repo
      Generate the template files for a new tap.
      
 --no-git: Don’t initialize a git repository for the tap.
 --pull-label: Label name for pull requests ready to be pulled (default pr-pull).
 --branch: Initialize git repository with the specified branch name (default main).

extract [options] formula tap Look through repository history to find the most recent version of formula and create a copy in tap/Formula/[email protected]. If the tap is not installed yet, attempt to install/clone the tap before continuing. To extract a formula from a tap that is not homebrew/core use its fully-qualified form of user/repo/formula.

extract [options] package user/repo
--version: Extract the specified version of formula instead of the most recent.
-f, --force: Overwrite the destination formula if it already exists.
Trisomic answered 22/10, 2020 at 9:40 Comment(0)
M
2

I ran into a similar error trying to run rails with postgresql. (I found this SO looking for a solution. Homebrew broke alot of things when it switched to open SSL 1.1.1) The above answers did not work for me (Mac 10.14.6). However, the answer found here did:

brew install --upgrade openssl
brew reinstall postgresql
Mcquillin answered 20/6, 2020 at 17:29 Comment(2)
invalid option: --upgradeCulinarian
@Culinarian brew upgrade opensslGonzales
M
2

I was able to solve this by upgrading Python 3 via brew

brew upgrade python@3

Musculature answered 6/7, 2020 at 11:49 Comment(0)
J
2

This worked for me: brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Suggested in this post: https://github.com/kelaberetiv/TagUI/issues/635#issuecomment-560139279

Jungjungfrau answered 8/7, 2020 at 7:11 Comment(0)
H
2

My recommendation is to never lower your openssl lib version for the sake of getting your build to work. Better to download the source code of the required lib and build it against the openssl version you have on your localhost.

I came across this posting while going through the same issue but was not comfortable lowering the openssl version come what may. Finally took the source code and build the app and it worked. I dont know why devs have their old versions of openssl on their boxes and which they build the dist packages and publish against those old version.

Harris answered 30/8, 2020 at 8:32 Comment(1)
I agree with your concerns @Harris 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.Cylix
R
2

I have tried several solutions proposed above without success.

So, I have installed the last ruby version 2.7.2 with rbenv, and upgraded my app.

Then I had a PG::ConnectionBad error.

I ran

brew postgresql-upgrade-database.

And now It’s working fine.

here more details about what I tried.

Roam answered 3/11, 2020 at 16:14 Comment(2)
Please 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.Rauch
This fixed it for me too, however the first time I ran it it did not. I had to brew uninstall postgresql@12 then re-run brew postgresql-upgrade-database which fixed it.Protagonist
A
1

I ran into this error with mysql (version: 5.6.46_2), Mac (Mojave 10.14.5):

    brew update && brew upgrade
    brew now setup_mysql
    echo ‘export PATH=“/usr/local/opt/mysql56/bin:$PATH”’ >> 
    ~/.bash_profile
    /usr/local/opt/mysql56/bin/mysql.server start
Amortize answered 5/4, 2020 at 0:18 Comment(0)
S
1

I spent a lot of time trying all of the above, and nothing seemed to solve. Then I resorted the reinstalling ruby, and 2 minutes later the problem entirely vanished.

I hope this saves something else some time.

Showery answered 31/5, 2020 at 16:32 Comment(0)
C
1

I found this question after searching for the first line of this error:

dyld: Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/local/lib/libgssapi_krb5.2.2.dylib
  Reason: image not found
Abort trap: 6

That I saw not from using vapor, but instead, as the result of using ssh and scp and git after upgrading some packages.

I think it's unwise to downgrade most packages as @Smokie and others suggested doing with openssl (especially for security-related packages).

So I generalized the answer posted by @MichalCichon on solving the problem with install_name_tool and that seems to have taken care of my issue (at least for now with ssh and scp; I think I'll be able to use a variant of this solution if the problem comes up again with another executable).

Because it was the non-existent /opt/local/lib/libcrypto.1.0.0.dylib library that was missing, and because I had a /opt/local/lib/libcrypto.1.1.dylib after upgrading, and because ssh and scp were referencing /opt/local/lib/libgssapi_krb5.2.2.dylib in an attempt to find /opt/local/lib/libcrypto.1.0.0.dylib, I just used install_name_tool like this:

$ sudo install_name_tool -change /opt/local/lib/libcrypto.1.0.0.dylib\
/opt/local/lib/libcrypto.1.1.dylib\
/opt/local/lib/libgssapi_krb5.2.2.dylib

Then tried running ssh again. It failed again, but this time with a different error:

dyld: Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/local/lib/libkrb5.3.3.dylib
  Reason: image not found
Abort trap: 6

So then I did:

$ sudo install_name_tool -change /opt/local/lib/libcrypto.1.0.0.dylib\
/opt/local/lib/libcrypto.1.1.dylib\
/opt/local/lib/libkrb5.3.3.dylib

and tried ssh again. Again it failed, but with yet another different error:

dyld: Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/local/lib/libk5crypto.3.1.dylib
  Reason: image not found
Abort trap: 6

So then I did:

$ sudo install_name_tool -change /opt/local/lib/libcrypto.1.0.0.dylib\
/opt/local/lib/libcrypto.1.1.dylib\
/opt/local/lib/libk5crypto.3.1.dylib

and tried ssh again. Again it failed, but with yet another different error:

dyld: Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib
  Referenced from: /opt/local/lib/libkrb5support.1.1.dylib
  Reason: image not found
Abort trap: 6

So then I did:

$ sudo install_name_tool -change /opt/local/lib/libcrypto.1.0.0.dylib\
/opt/local/lib/libcrypto.1.1.dylib\
/opt/local/lib/libkrb5support.1.1.dylib

and tried ssh again. Finally, ssh and scp and git resumed working as expected.

Thank you @MichalCichon for a great answer that I was able to generalize beyond vapor to allow myself to continue using ssh without downgrading my openssl!

Cylix answered 30/8, 2020 at 18:14 Comment(0)
F
1

After trying all your answers, it still did not fix my issue on my Mac Big Sur. I tried on another Mac Big Sur and it worked for me. When try executing which openssl command to determine where is the OpenSSL symlink. It was /usr/bin/openssl, that different from on my PC is /usr/local/bin/openssl.

I realized that there are 2 OpenSSL symlinks on my PC. /usr/local/bin/openssl /usr/bin/openssl

I tried removing the current OpenSSL symlink

rm -rf /usr/local/bin/openssl

And run which openssl again, it pointed to /usr/bin/openssl

After that, openssl command worked for me.

Fractional answered 8/3, 2021 at 7:38 Comment(1)
One may break existing apps if they were referencing the deleted linkMalik
F
1

there is/was no issue with the openssl version. In my case the symlink was missing, so:

sudo ln -s /opt/vagrant/embedded/lib/libssl.1.0.0.dylib /opt/local/lib/libssl.1.0.0.dylib
sudo ln -s /opt/vagrant/embedded/lib/libcrypto.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib`

did the trick.

Famished answered 28/3, 2021 at 23:32 Comment(0)
O
1

For me it was that I had some old version of wget in my PATH. Removed it with:

/usr/local/bin/wget
λ  ~  rm -rf /usr/local/bin/wget

and then the brew installed executable had precedence and worked fine.

Omphalos answered 14/12, 2023 at 5:50 Comment(0)
T
0

on a macOS 10.9.5 machine with macports 2.8.0:

sudo -s ln -s /opt/local/lib/openssl-1.0/libcrypto.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib  

helped

Tautonym answered 8/1, 2023 at 9:4 Comment(0)
B
-1

I have openssl1.1 installed on my system, but the rails is somehow using the old reference i.e /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError) but this doesn't exist on my Mojave 14.

I tried the below solutions but no luck:

  1. brew switch openssl 1.0.2t (Error: Unknown command: switch)
  2. reintalling openssl
  3. downgrade the version of openssl to 1.0
  4. Reintalling rvm and ruby

Finally, below solution works:

cp /usr/local/opt/openssl/lib/libssl.1.1.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
cp /usr/local/opt/openssl/lib/libcrypto.1.1.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

Just copy the new openssl link to the old ones

OR

create the symlinks like below :

ln -sfn /usr/local/Cellar/[email protected]/1.0.2t /usr/local/opt/[email protected]
Bluefarb answered 7/3, 2021 at 16:45 Comment(2)
Did 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.Springfield
Downvoted as it is incorrect to use 1.1.1 binaries instead of 1.0: underlying OpenSSL data structures are different and app built w 1.0 won’t work without porting w 1.1.1Malik
N
-2

Had this error with [email protected]

Try to reinstall mysql

brew reinstall [email protected]

This will fix

Nereidanereids answered 29/9, 2020 at 10:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.