我很难第一次获得postgres。我用自制软件安装了pg,我收到的错误在这里看起来很常见:
createuser: could not connect to database postgres: could not connect
to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
我读过最常见的解决方案是通过运行rm /usr/local/var/postgres/postmaster.pid
来删除postmaster.pid文件
然而,这导致以下结果:
rm: /usr/local/var/postgres/postmaster.pid: Permission denied
我知道如何才能实现这一目标吗?