[OSM-dev] Socket problem with osm2pgsql on Mac/Homebrew

Michael Daines michael at mdaines.com
Thu Jun 14 19:22:42 BST 2012


> I have confirmed that /usr/local/bin/osm2pgsql and /usr/local/bin/psql are the versions being used by my system (with which psql, which osm2pgsql).
> When I try to run osm2pgsql I get a strange connection error:
> 
> osm2pgsql us-south.osm.pbf -r pbf
> osm2pgsql SVN version 0.80.0 (32bit id space)
> 
> Error: Connection to database failed: 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"?
> 
> Any suggestions? I can connect locally to my databases fine with Navicat and via psql. Is it possible that osm2pgsql is trying to access the wrong psql?

When using homebrew, it appears that you need to include the following option:

   --host=/tmp

From this guide:

  http://bdon.org/2012/03/23/osm2pgsql-homebrew-and-postgis-on-lion/


-- Michael




More information about the dev mailing list