Skip to content

Instantly share code, notes, and snippets.

@c0debreaker
Last active December 3, 2019 03:32
Show Gist options
  • Save c0debreaker/a383a92b969571037780c571b66a3985 to your computer and use it in GitHub Desktop.
Save c0debreaker/a383a92b969571037780c571b66a3985 to your computer and use it in GitHub Desktop.

socat fails with dyld library not found. This hack worked like a charm!

These are 2 different errors I executed when I was trying to setup a port 80 listener

sudo socat -d -d TCP-LISTEN:80,fork TCP:$(ipconfig getifaddr en0):31000
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/socat
  Reason: image not found
Abort trap: 6

and

sudo socat -d -d TCP-LISTEN:80,fork TCP:$(ipconfig getifaddr en0):31000
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/bin/socat
  Reason: image not found

This is how you fix libssl

Of course, you have to verify libssl.1.1.dylib specifically the file you have in your system.

sudo ln -s /usr/local/opt/openssl/lib/libssl.1.1.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

This is how to fix libcrypto

You should have an existing libcrypto.1.1.dylib. Check the version you have in your system.

sudo ln -s /usr/local/opt/openssl/lib/libcrypto.1.1.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment