Postgresql -bash: psql: command not found

后端 未结 6 2101
借酒劲吻你
借酒劲吻你 2020-12-13 17:39

I have installed PostgreSQL and it is working ok. However, when I went to restore a backup I got the error -bash: psql: command not found:

 [roo         


        
6条回答
  •  一生所求
    2020-12-13 18:01

    It can be due to psql not being in PATH

    $ locate psql
    /usr/lib/postgresql/9.6/bin/psql
    

    Then create a link in /usr/bin

    ln -s /usr/lib/postgresql/9.6/bin/psql /usr/bin/psql
    

    Then try to execute psql it should work.

提交回复
热议问题