简体   繁体   English

无法启动 PostgreSQL 服务器

[英]Could not start PostgreSQL server

I downloaded postgres app and when I create new server on port 5432 try to start it I get an error:我下载了 postgres 应用程序,当我在端口 5432 上创建新服务器时尝试启动它时出现错误:

pg_ctl: could not start server
Examine the log output.

Then I have Open Server Log button below it and when I click on it I get:然后我在它下面有Open Server Log按钮,当我点击它时,我得到:

2022-09-25 17:29:33.872 CEST [1054] LOG:  database system is shut down
2022-09-25 17:30:44.244 CEST [1068] LOG:  starting PostgreSQL 14.5 on aarch64-apple-darwin20.6.0, compiled by Apple clang version 12.0.5 (clang-1205.0.22.9), 64-bit
2022-09-25 17:30:44.245 CEST [1068] LOG:  listening on IPv6 address "::1", port 5432
2022-09-25 17:30:44.245 CEST [1068] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-09-25 17:30:44.246 CEST [1068] FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
2022-09-25 17:30:44.246 CEST [1068] LOG:  database system is shut down

The permissions on your /tmp are messed up. /tmp上的权限搞砸了。 They should be so that everybody could create files there:他们应该这样每个人都可以在那里创建文件:

$ ls -ld /tmp
drwxrwxrwt 24 root root 620 Sep 26 07:26 /tmp

I would reinstall the operating system and start again.我会重新安装操作系统并重新开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM