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

Michael Corey mcorey at cironline.org
Thu Jun 14 19:34:55 BST 2012


Thanks -- that fixes that error, and I'm getting further into the 
process. I'm now getting this:

Reading in file: us-south.osm.pbf
Entity: line 1: parser error : Document is empty

I'm wondering if it's because PBF support isn't running correctly -- 
downloading a osm.bz file to check if that helps.

If I run the command with the -r pbf flag:

osm2pgsql us-south.osm.pbf -r pbf -d border_processing_test -H /tmp/

I get:

Using projection SRS 900913 (Spherical Mercator)
Input parser `pbf' not recognised. Should be one of [libxml2, primitive].

Thanks again,

Michael Corey
News Applications Developer
Center for Investigative Reporting
510.809.3178

/2012 Recipient of the MacArthur Award for Creative and Effective 
Institutions/

On 6/14/12 11:22 AM, Michael Daines wrote:
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20120614/4b83047e/attachment.html>


More information about the dev mailing list