After installing Postgresql from postgresql.org/download, and then running brew install postgresql, I am trying to confirm I have installed postgresql by typing 'psql --version' on my zsh, terminal. However, it is showing the following error message:
psql --version
dyld: Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib
Referenced from: /usr/local/Cellar/postgresql/12.4/lib/libpq.5.12.dylib
Reason: image not found
zsh: abort psql --version
I have tried many commands I found online such as brew doctor, brew update, brew install readline, brew link readline --force, and cd /usr/local/opt/readline/lib ln -s libreadline.8.0.dylib libreadline.7.dylib, not particularly in order.
Why is the error message saying "Library is not loaded" when I have successfully installed, and what commands can I run to resolve?