我已经安装了PostgreSQL,并且它正常工作。但是,当我尝试恢复备份时,出现了错误-bash: psql: command not found
:
[root@server1 ~]# su postgres
[postgres@server1 root]$ psql -f all.sql
bash: psql: command not found
[postgres@server1 root]$
我做错了什么?
我已经安装了PostgreSQL,并且它正常工作。但是,当我尝试恢复备份时,出现了错误-bash: psql: command not found
:
[root@server1 ~]# su postgres
[postgres@server1 root]$ psql -f all.sql
bash: psql: command not found
[postgres@server1 root]$
我做错了什么?
postgresql-server92
),然后不小心又安装了PostgreSQL 8.4(包名为postgresql-server
),那么在CentOS操作系统中就可能会出现这种情况。如果你卸载了PostgreSQL 8.4,yum也会将postgres二进制文件目录从路径中删除。 - Iain Samuel McLean Elder