Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 设置和运行PostgreSQL时权限被拒绝_Macos_Postgresql_Osx Lion - Fatal编程技术网

Macos 设置和运行PostgreSQL时权限被拒绝

Macos 设置和运行PostgreSQL时权限被拒绝,macos,postgresql,osx-lion,Macos,Postgresql,Osx Lion,我对博士后和网络开发完全陌生。我正在进行MacOSX10.7Lion的新安装,有人告诉我PostgreSQL实际上是打包的。这是我在终端中键入“psql”时得到的结果 $ psql psql: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.

我对博士后和网络开发完全陌生。我正在进行MacOSX10.7Lion的新安装,有人告诉我PostgreSQL实际上是打包的。这是我在终端中键入“psql”时得到的结果

$ psql
psql: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
我自己没有使用任何包管理器安装PostgreSQL。我只是在用狮子带来的东西。不幸的是,我甚至不能设置数据库


注意:我没有安装MacPorts。

您需要启动PostgreSQL server。它看起来好像当前没有运行。可能是
pg\u ctl start
。不幸的是,我得到:-bash:pg\u ctl:command未找到。这有帮助吗?不幸的是没有。我得到:sudo:/usr/local/pgsql/bin/pg_ctl:command未找到。顺便说一句,谢谢你的帮助。你认为如果我用自制软件重新安装,会有帮助吗?如果是,我是否需要卸载默认的PostgreSQL?