放弃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身份运行命令时也会发生同样的事情。