uWSGI无法加载libssl.1.0.0.dylib

Xin*_*Shi 15 macos libssl uwsgi

当我打电话时uwsgi,它总是显示以下内容:

dyld: Library not loaded: libssl.1.0.0.dylib
  Referenced from: /Users/xingshi/anaconda/bin/uwsgi
  Reason: image not found
Trace/BPT trap: 5
Run Code Online (Sandbox Code Playgroud)

这是我Mac上的所有libssl.1.0.0.dylib:

$ locate libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib
/Users/xingshi/anaconda/lib/libssl.1.0.0.dylib
/Users/xingshi/anaconda/pkgs/openssl-1.0.1c-0/lib/libssl.1.0.0.dylib
/opt/local/lib/libssl.1.0.0.dylib
Run Code Online (Sandbox Code Playgroud)

而我uwsgianaconda

$which uwsgi
/Users/xingshi/anaconda/bin/uwsgi
Run Code Online (Sandbox Code Playgroud)

有任何想法吗 ?

Xin*_*Shi 53

MacPorts通常会安装软件/opt/local/,但brew会安装软件/usr/local/.看来我uwsgi正在寻找libssl.1.0.0.dylib/ usr/local/lib,所以我使用brew来安装openssl并重新链接它:

brew install --upgrade openssl
brew unlink openssl && brew link openssl --force
Run Code Online (Sandbox Code Playgroud)

  • 出现多个错误:--upgrade 不是一个选项 (3认同)

rei*_*eid 8

我执行了这个:

我已经有很长一段时间和这个错误表演了

brew uninstall openssl
brew install openssl
Run Code Online (Sandbox Code Playgroud)

对我来说没有用,甚至包括"--force"

但是,我发现这个链接到这个博客,它确实对我有用.

http://mithun.co/hacks/library-not-loaded-libcrypto-1-0-0-dylib-issue-in-mac/

第1步:使用brew安装openssl

brew install openssl 
Run Code Online (Sandbox Code Playgroud)

第2步:复制libssl.1.0.0.dylib和libcrypto.1.0.0.dylib

cd /usr/local/Cellar/openssl/1.0.1f/lib  

sudo cp libssl.1.0.0.dylib libcrypto.1.0.0.dylib /usr/lib/ 
Run Code Online (Sandbox Code Playgroud)

请注意粗体文件夹名称.根据您的openssl版本,会有变化

第3步:删除现有链接

sudo rm libssl.dylib libcrypto.dylib 

sudo ln -s libssl.1.0.0.dylib libssl.dylib 

sudo ln -s libcrypto.1.0.0.dylib libcrypto.dylib
Run Code Online (Sandbox Code Playgroud)

我希望这有帮助!