Error when installing Homebrew: dyld: Library not loaded: @rpath/libssl.1.0.0.dylib
Asked Answered
B

3

10

I'm trying to install Homebrew on my MacOS (macOS Mojave Version 10.14.3)

And I keep getting the following error (the exact message I see in my terminal):

dyld: Library not loaded: @rpath/libssl.1.0.0.dylib
  Referenced from: /Users/[my_machine_name]/anaconda3/lib/libssh2.1.dylib
  Reason: image not found

I see a lot of solutions mentioning some brew related commands as part of their solution, but I'm trying to install brew here so I don't have brew yet. I'm wondering what I need to do?

Edit:

I'm using the following command to install brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Belisle answered 6/2, 2019 at 23:18 Comment(0)
D
13

You can resolve the issue by installing libssh2 via conda environment manager.

conda install libssh2 
Drip answered 16/3, 2019 at 11:21 Comment(0)
B
3

I finally figured what the problem was. The dylib couldn't be found. So I added the following line to the ~/.bash_profile (you can open this file using the nano ~/.bash_profile command or open it using any other editor than nano):

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib

This line simply tells where we should be looking for the dylibs. Just figure out where your dylibs are (in my case they are at /opt/local/lib) and add the path to the ~/.bash_profile file.)

Notice: This solution might potentially affect some other functionalities. But in my case, it helped to successfully install the Homebrew. It would be great if anyone shares a better solution if there's any.

Belisle answered 11/2, 2019 at 23:54 Comment(0)
D
1

I had the same problem after upgrading to python 3.7 with conda. New git repos would produce the following error with git pull or git push

dyld: Library not loaded: @rpath/libssl.1.0.0.dylib

Referenced from: /Users/alexis/anaconda3/lib/libssh2.1.dylib

Reason: no suitable image found.

I'm on macOS 10.12.6 Sierra. Reinstalling libssl or git, updating brew did not fix it.

The fix was

conda update --prefix /Users//anaconda3 anaconda

I am now on

conda 4.6.9

Dixil answered 3/4, 2019 at 13:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.