I just installed posgresql with homebrew and when I go on to type the command
psql
I get the following error:
dyld: Library
I was getting the exact same error, but the above answers didn't work for me. I had to reinstall postgresql.
brew reinstall postgresql
It seems to me the problem is about update readline package. postgres tryied to use /usr/local/opt/readline/lib/libreadline.7.dylib in my case. So i just created a symlink to existing version of library /usr/local/opt/readline/lib/libreadline.8.dylib.
worked for me:
ln -s /usr/local/opt/readline/lib/libreadline.8.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
I had this issue, and the key for me was to reinstall
both readline
and postgres
. Once postgres was reinstalled, the issue was resolved.
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.
You could try brew doctor
and see what it says.
Possibly all you need is brew link --overwrite bash
.
For me, I just upgraded brew since OS X EL Capitan had some security upgrade that affetcs my /usr
folder. During the brew upgrade, the bash link is broken, and this is what brew doctor
tells me.
So I just run brew link --overwrite bash
and everything's fine.
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:
brew unlink postgresql93
brew link postgresql