Dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility

At startup

$ psql 

I get this error

 dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib dyld: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib Abort trap: 6 

I have tried several things:

  • some posts suggested for brew update
  • some suggested adding / usr / local / bin / psql to the ~ / .bash_profile file and restarting the system.
  • Several people said that this is a problem with Xcode, but I do not have Xcode, so it is not suitable for me, I think.

but none of this worked out.

my bash_profile looks like this:

 PATH="/usr/local/bin/psql:/usr/local/sbin:/usr/local/bin:/sbin:/bin :/usr/sbin:/usr/bin:/root/bin:/usr/local/bin/geckodriveβ€Œβ€‹r:$PATH" export PATH 

I use:

  • psql (PostgreSQL) 9.6.2
  • macOS Sierra version 10.12.3
+7
homebrew psql macos
source share
2 answers

I was on PostgreSQL 9.6.2 too, and ran into the same problem.

I upgraded to 9.6.3 using brew as follows:

 rm '/usr/local/lib/libpq.5.dylib' brew upgrade postgresql brew link postgresql 

This worked, and now I have access via psql again.

+16
source share

The thing that worked for me was to uninstall and reinstall postgres using the following code:

 brew uninstall postgresql brew install postgresql 
+1
source share

All Articles