gpt4 book ai didi

postgresql - 无法使用命令 'postgres' 或 'pg_ctl'

转载 作者:行者123 更新时间:2023-11-29 11:22:27 25 4
gpt4 key购买 nike

我在 Unix 上。我已经安装了 postgresql-9.3。
当我想使用 pg_ctlpostgres 启动服务器时,终端会给我:

The program 'postgres' is currently not installed. You can install it by typing:sudo apt-get install postgres-xc

如果没有这个 postgres-xc,我不能启动服务器吗?

最佳答案

这一定是您之前安装的 postgres-xc 包的残余。

由于您刚刚安装了 postgresql-9.3 并且似乎没有使用任何数据库,但是,我建议完全清除所有 postgres 包。

sudo apt-get purge postgresql-9.2
sudo apt-get purge postgresql-xc
...

直到一无所有:

dpkg -l | grep postgres

然后从头开始。您的 pg_ctl 实例似乎属于包 postgres-xc。卸载软件包后,这应该会消失。用 one of these commands 找出答案:

dpkg -S pg_ctl
dlocate pg_ctl
apt-file search pg_ctl

pg_ctlclusterpostgresql-common 包提供。
pg_ctlpostgresql-9.3 包提供。

More about starting Postgres in the manual.

关于postgresql - 无法使用命令 'postgres' 或 'pg_ctl',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24757457/

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