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

被刻印的时光 ゝ 提交于 2019-12-29 08:27:19

问题


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. Thanks in advance.


回答1:


This is less likely to work if you already tried to reinstall vapor:

Try to update brew:

brew update

It will take awhile as it will update all your dependencies. And then install openssl again:

brew install openssl

Alternatively try this:

brew reinstall openssl

This can work if you already tried to reinstall vapor:

If none of those tricks above work, 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/libssl.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).




回答2:


Switch to an older openssl package

brew switch openssl 1.0.2s



回答3:


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

brew uninstall vapor
brew install vapor/tap/vapor

It worked.




回答4:


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


来源:https://stackoverflow.com/questions/59006602/dyld-library-not-loaded-usr-local-opt-openssl-lib-libssl-1-0-0-dylib

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