17

When I call uwsgi, it always shows the following:

dyld: Library not loaded: libssl.1.0.0.dylib
  Referenced from: /Users/xingshi/anaconda/bin/uwsgi
  Reason: image not found
Trace/BPT trap: 5

Here is all the libssl.1.0.0.dylib on my Mac:

$ 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

And my uwsgi is in anaconda

$which uwsgi
/Users/xingshi/anaconda/bin/uwsgi

Any ideas ?

Xing Shi
  • 1,984
  • 3
  • 16
  • 31

3 Answers3

55

MacPorts usually install softwares into /opt/local/, but brew will install softwares into /usr/local/. It seems that my uwsgi is looking for the libssl.1.0.0.dylib in /usr/local/lib, so I use brew to install openssl and relink it:

brew install --upgrade openssl
brew unlink openssl && brew link openssl --force
Xing Shi
  • 1,984
  • 3
  • 16
  • 31
  • This seems to have solved [a related problem](http://stackoverflow.com/q/31406148/656912) for me. Will it be safe to do this every time I run `brew upgrade --all` as part of my regular Homebrew/Python maintenance? – orome Jul 14 '15 at 12:23
  • thanks ! this command `brew unlink openssl && brew link openssl --force` worked! – jawa Jul 14 '15 at 12:43
  • What if this error happens when we want to install Homebrew? [Like this problem](https://stackoverflow.com/questions/54564036/error-when-installing-homebrew-dyld-library-not-loaded-rpath-libssl-1-0-0-dy) – Pedram Feb 11 '19 at 23:13
  • 3
    getting multiple errors: --upgrade is not an option – n3rd Jun 12 '20 at 11:23
  • 1
    Warning: Refusing to link macOS provided/shadowed software: openssl@1.1 – n3rd Jun 12 '20 at 11:24
9

I performed this:

I have been having this error for a long time and performing

brew uninstall openssl
brew install openssl

did not work for me even including "--force"

However, I found this link to this blog and it did work for me.

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

Step 1: Install openssl using brew

brew install openssl 

Step 2: Copy copy libssl.1.0.0.dylib and 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/ 

Note the bold folder name. There will be change in that depending on your openssl version

Step 3: Remove the existing links

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

I hope this helps!

reid
  • 474
  • 5
  • 17
  • be careful, I did that and it made things worse. I also tried copying the version from the anaconda path, that didn't work either. – szeitlin Jun 30 '15 at 22:48
  • After an eight hour adventure, this worked for me. I did not do step 3, and do not consider this a "final" solution, but it worked. – Kenny Cason Dec 06 '16 at 16:46
0

my error specifically for Mac OSx, was..

user-MacBook-Pro:src user$ uwsgi --enable-threads --ini deploy.ini
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/uwsgi
  Reason: image not found
Abort trap: 6
user-MacBook-Pro:src user$ 

this suddenly started happening, either after upgrading Mac OSx to v10.14.6 or after an extensive installation process playing around with aircrack-ng (i'm not sure which)

but, the following fixed my issue... (help from https://stackoverflow.com/a/59055043/2298002)

$ brew update
$ brew upgrade
$ brew install openssl # yielded 'already installed'
$ brew reinstall uwsgi # yielded 'could not symlink' error
$ brew link --overwrite uwsgi

NOTE: uwsgi now works fine, but i still cannot run $ man uwsgi, yields...

user-MacBook-Pro:src user$ man uwsgi
No manual entry for uwsgi
user-MacBook-Pro:src user$

... anyone have any incites to this?

greenhouse
  • 1,078
  • 13
  • 17