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

ⅰ亾dé卋堺 提交于 2019-12-22 09:09:08

问题


I'm trying to install Homebrew on my Mac os (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)"

回答1:


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

conda install libssh2 



回答2:


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




回答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.



来源:https://stackoverflow.com/questions/54564036/error-when-installing-homebrew-dyld-library-not-loaded-rpath-libssl-1-0-0-dy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!