This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

osm2pgsql not working in windows

0

Hi, I have just downloaded osm2pgsql for Windows and I am trying to execute:

osm2pgsql -s -U postgres -d gisdb C:\Users\MyUser\Documents\data.osm

However, I am gettint this error:

osm2pgsql SVN version 0.83.0 (64bit id space)

Error: Connection to database failed: could not connect to server: No such file or directory

  Is the server running locally and accepting connections on Unix domain socket "/tmp/.sPGSQL.5432"?

What is the problem?

Thanks!

asked 22 Apr '14, 22:39

AnderOSM's gravatar image

AnderOSM
714411
accept rate: 0%


2 Answers:

4

Try the additional options --port 5432 and --host localhost to force osm2pgsql to make a TCP connection instead of using the Unix Domain Socket.

answered 22 Apr '14, 23:38

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

I also needed -W so that the command line asks for my database user's password.

(23 Apr '14, 12:00) AnderOSM

0

Are you sure your postgres server is running ?

answered 22 Apr '14, 23:31

exxos's gravatar image

exxos
81338
accept rate: 0%

Source code available on GitHub .