I just installed posgresql with homebrew and when I go on to type the command
psql
I get the following error:
dyld: Library
The following commands worked for me:
brew reinstall postgresql
brew postgresql-upgrade-database
Another way to fix psql is update postgresql just running
brew upgrade postgresql
since the newest version will use readline 7 version.
I tried all the previews answers, and nothing worked. The only thing that really worked for me was:
brew link postgresql
This worked for me
brew switch readline
This would display the versions you have installed. Pick one out of them. I picked 7.0.5
I then ran
brew switch readline 7.0.5
The readline version got updated, and psql
ran smoothly.
The solution is to force the linking of readline again.
brew remove readline
brew install readline
brew link readline --force
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:
brew reinstall readline