Mac psql/readline - Library not loaded

后端 未结 3 1920
甜味超标
甜味超标 2021-02-12 10:45

I\'m working on a Mac, Sierra 10.12.3, and I\'m trying to access a PostgreSQL database via the psql command, but it threw the error

dyld: Library n         


        
相关标签:
3条回答
  • 2021-02-12 10:50

    I was able to resolve this by simply running brew switch readline 6.3.8

    0 讨论(0)
  • 2021-02-12 10:53

    Readline has been upgraded but you are still using an older psql from postgres. Upgrading postgres to a current version that uses the current readline fixed the problem for me:

    brew upgrade postgres

    0 讨论(0)
  • 2021-02-12 11:08

    After I run brew upgrade, I also had this problem.

    First, You need to confirm the version of the readline on your Mac.

    In your situation, your old readline's version is 6.x. After upgrading, your readline was updated into 7.0.1. So you need to link your new readline.

    These code might be helpful.

    $ cd /usr/local/opt/readline/lib/  # cd to readline library
    $ sudo ln -s libreadline.7.dylib libreadline.6.dylib  # change the link
    

    I think the better way is to change the system readline link, but I don't know how to change.

    0 讨论(0)
提交回复
热议问题