【发布时间】:2014-07-14 23:21:55
【问题描述】:
在将原来的 postgres 安装替换为 homebrew 安装后,我遇到了 postgres 问题。
启动后,如果我发出 psql 命令,我会得到:
psql: 无法连接到服务器: 没有这样的文件或目录是 服务器在本地运行并接受 Unix 域上的连接 套接字“/tmp/.s.PGSQL.5432”?
如果我跑:
ps auxwww | grep postgres
我得到了这个奇怪的输出:
paulcowan 2829 0.0 0.0 2432784 540 s000 R+ 9:17am 0:00.00 grep postgres
如果我跑步:
ps -ef | grep postgres
我明白了:
501 2842 1040 0 9:19am ttys000 0:00.00 grep postgres
如果我然后运行:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
一切都开始了。
我试图让 postgres 在登录时启动,然后输入以下命令:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
接下来是:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
我收到此错误:
launchctl: 不能 stat("/Users/paulcowan/Library/LaunchAgents/homebrew.mxcl.postgresql.plist"): 没有找到可以加载的文件或目录
【问题讨论】:
-
您使用的是哪个操作系统?
-
@a_horse_with_no_name Mac OS X - 只有 launchd 的东西
标签: macos postgresql