gpt4 book ai didi

linux - 须藤: psql: command not found: can't fix it

转载 作者:太空宇宙 更新时间:2023-11-04 05:07:39 25 4
gpt4 key购买 nike

当我运行时

sudo -u postgres psql

我明白了

sudo: psql: command not found

错误。我无法让它工作。

# locate psql
/etc/alternatives/psql.1.gz
/usr/bin/psql
/usr/lib/postgresql/9.5/bin/psql
/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
/var/lib/dpkg/alternatives/psql.1.gz
/var/lib/postgresql/.psql_history

# ln -s /usr/lib/postgresql/9.5/bin/psql /usr/bin/psql
ln: failed to create symbolic link '/usr/bin/psql': File exists

没用。不过,Postgresql 正在运行并且运行良好。

最佳答案

.bash_profile 中设置 postgres' PATH 变量以包含 /usr/lib/postgresql/9.5/bin

关于linux - 须藤: psql: command not found: can't fix it,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59221181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com