Search code examples
djangopostgresqlubuntupostgisgeodjango

error: Please install the PostgreSQL server development packages and re-run configure


I am trying to install the Postgis on my ubuntu system for django framework. But everytime when i run the command ./configure it gives me error

 error: the PGXS Makefile /usr/lib/postgresql/9.3/lib/pgxs/src/makefiles/pgxs.mk cannot be found. Please install the PostgreSQL server development packages and re-run configure.

I have already installed postgres on my system and has also created the user. But i am unable to install the Postgis on my system. I have gone through the many instructions i found on Internet but failed to install it.

Please tell me the solution of this error so that i can install Postgis on ubuntu. help will be highly appreciated


Solution

  • Assuming you're using PostgreSQL from http://apt.postgresql.org/ :

    apt-get install postgresql-server-dev-9.3
    

    While you're at it, as @BurhanKhalid points out, you should just be installing PostGIS from packages, rather than from source, as the PostGIS web page explains:

    apt-get install postgis2_93