I just installed posgresql with homebrew and when I go on to type the command
psql
I get the following error:
dyld: Library
this worked for me
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
For some unknown reason, when this error popped up for the next version of Readline, my RVM seemed unable to locate the right one no matter how I symlinked it, throwing:
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
I ended up adding the gem rb-readline
to my Gemfile and doing another bundle install
and it started working.
I... just don't know.
In my case the correct answer did not fix the problem.
The problem started after running brew doctor
and adding export PATH="/usr/local/bin:$PATH"
to my ~/.zshrc file.
Removing
export PATH="/usr/local/bin:$PATH"
from ~/.zshrc
got it solved.
The answer above didn't work for me so I wanted to post what did eventually work. Based on a thread I found here, I had to uninstall readline and the install it again but from source.
brew uninstall readline
brew install --build-from-source readline
After that the psql error went away.