Just upgraded to Big Sur, everytime I save a document, I keep getting this error:
dyld: Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Just upgraded to Big Sur, everytime I save a document, I keep getting this error:
dyld: Library not loaded: /usr/lib/libpq.5.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
When I run sudo find / -name libpq.5.dylib the file is located in:
/usr/local/Cellar/libpq/10.4/lib/libpq.5.dylib
But your php
executable is still broken right? you could get to the bottom of this and run
otool -L /usr/local/bin/php
This will print the shared libraries that the php
executable depends on. If it’s just the PostgreSQL client library that’s missing, you could try
brew link libpq
and see if php
works.
Probably something in brew
is broken.
Thank you rwols, the otool lists libpq.5.dylib that the executable depends on.
But when I try the “brew link” command it failed.
I had to update homebrew with the following command first:
brew update
then: brew link libpq --force
And now it works like magic… thank you!!!