我已经安装了
postgresql 9.5.13,但它似乎无法正常工作.我不断得到这条消息:
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 “/var/run/postgresql/.s.PGsql.5432”?
解决方法
查看该服务是否正在运行
systemctl status postgresql
如果Postgresql正在运行,您将看到包含文本Active:active(exited)的输出.
如果您看到Active:inactive(dead),请使用以下命令启动Postgresql服务:
systemctl start postgresql
还需要启用Postgresql才能重启.使用此命令执行此操作:
systemctl enable postgresql
跑
pg_lsclusters Ver Cluster Port Status Owner Data directory Log file 9.5 main 5433 online postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log Status - online - fine
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。