Here is how I fixed the
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI error on MacOS.
Recently I moved from the MacOS standard (old) terminal to
zsh. I also updated all my
brew packages. I’ll be honest, I do not know which of those two things caused the issue, but the end result was that most of my Python-based programs were broken with the error report:
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI
After some hunting, I found the solution.
- Open a new terminal window and
- List all directories which begin with ‘openssl’:
ls | grep '^openssl*'. I get
- Set the
DYLD_FALLBACK_LIBRARY_PATHvariable to point to the
libfolder of the
openssldirectory. Note: I chose the
firstname.lastname@example.org. Frankly that was just a guess (based on the fact that it has a version number and that is what the error was complaining about). I am not claiming that it’s correct.
- Open a new terminal window and retry your script. It should now work.
Persisting The Parameter
To persist this parameter, write it into
~/.bashrc then run
sudo nano ~/.bashrc
Paste this line into the file:
As always, if you have any comments or suggestions, please do not hesitate to contact me.