我遇到的问题描述如下: Repairing Postgresql after upgrading to OSX 10.7 Lion 但没有得到它解决。升级到OSX 10.7.3后修复Postgresql Lion
Postgres的应用生成错误是在/usr/bin/psql
, 但正确的是在 /Library/PostgreSQL/9.1/bin/psql
。
当我添加了以后我的路在.bash_profile
(甚至/etc/paths
),卸载和安装PG宝石,那么我仍然收到错误:
.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `initialize': could not connect to server: Permission denied (PG::Error) Is the server running locally and accepting
我试了好几次,也与选项:
-- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config
任何想法?
编辑:
通过更多帖子看完后(如http://www.iainlbc.com/2011/10/osx-lion-postgres-could-not-connect-to-database-postgres-after-homebrew-installation), 我只是做了以下内容:
sudo ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
和它的工作。我根本不知道为什么。我有两个Postgres安装吗?应用程序放在/usr/bin/psql
文件后面的位置在哪里?
OSX 10.7附带PostgreSQL(9.0.5)客户端库和命令行实用程序。 OSX 10.7服务器也有PostgreSQL服务器。 – 2012-02-27 21:13:48