I just installed posgresql with homebrew and when I go on to type the command
psql
I get the following error:
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
[1] 69711 trace trap psql
Does anyone have any idea about what's wrong?
this worked for me
You might want to check if you have anything else symlinked to
postgresql
. I had previously linked to the postgres93 package, which, as of May '17, is unsupported and has been removed. Removing that link and then relinking worked for me:I had this problem when I updated readline to version 7 by accident. I uninstalled readline and brew remind me 6.3.8 is still installed. It seems that version 7 is not working with PSQL at the moment.
If the situation is you have a higher version readline say 7.0. You can do this
If you don't have readline installed, first install it:
brew install readline
For me, I was getting this error, even though I had readline installed. Reinstalling readline did the trick:
None of those solutions worked for me; I had to run :
from : https://github.com/Homebrew/homebrew-core/issues/5799