views:

94

answers:

1

I've installed PostgreSQL and PostGIS, and now I'm trying to follow these instructions: http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#spatialdb-template

But I keep getting the following error, both in the command prompt and in Cygwin:

C:\Users\Home>createdb -E UTF8 template_postgis
createdb: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

And I know PostgreSQL is running, because I'm using it right now!

Installing open source applications can sometimes be so frustrating...

I'll be very grateful for your help!

+1  A: 

Are you by any chance using cygwin here? Particuarly, is the system picking up createdb from a cygwin binary?

If your server is cygwin, try removing it and replace it with the Windows version.

If your server is the Windows version, but you have createdb from a cygwin install in the PATH, try removing cygwin from your PATH to make sure you pick up the Windows version of createdb.

Magnus Hagander
Thank you for the answer. I still haven't got the chance to check it out because I'm working on something else right now, but I'll definitely let you know if I get back to PostGIS. Thanks again!
Ilya Kogan