admin管理员组

文章数量:1618705

启动postgresql: brew services start postgresql

报错信息如下:

Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/xxx/Library/LaunchAgents/homebrew.mxcl.postgresql@14.plist` exited with 5.

vi /Users/xxx/Library/LaunchAgents/homebrew.mxcl.postgresql@14.plist这个文件

接着查看log: vi /usr/local/var/log/postgresql@14.log

可以看到 这个错误:could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied 

一开始一直以为权限问题,执行chmod,删除都没有作用。

后百度,发现不是这个文件的问题,在试验脚本的过程中没关闭数据库。执行ls -l /tmp/,列出隐藏文件,删除tmp下跟postgresql有关的隐藏文件就ok了。

参考链接:

pg启动异常FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied_sunshinepx的博客-CSDN博客

本文标签: 异常failureexecutingpgError