无法在Ubuntu 17.10

时间:2017-11-02 02:56:27

标签: postgresql ubuntu

放弃linuxbrew,使用apt安装postgresql。现在我收到了这个错误:

$ /usr/lib/postgresql/9.6/bin/pg_ctl -D /var/lib/postgresql/9.6/main -l logfile start
pg_ctl: could not open PID file "/var/lib/postgresql/9.6/main/postmaster.pid": Permission denied

我尝试以超级用户身份运行:

$ sudo /usr/lib/postgresql/9.6/bin/pg_ctl -D /var/lib/postgresql/9.6/main -l logfile start
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

我不明白我应该登录哪些用户。


原帖:

我已经安装了postgresql,但是无法启动它:

$ brew services start postgresql
sh: 1: list: not found
Error: Failure while executing:  load -w /home/me/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

.plist文件存在。不确定这个错误意味着什么!以root身份运行命令时也会发生同样的事情。

1 个答案:

答案 0 :(得分:4)

大穗!想出来,感谢this thread.在Ubuntu中,使用此命令启动postgresql:

sudo service postgresql start