error: Please install the PostgreSQL server development packages and re-run configure
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
Install postgreSql
sudo apt-get install postgresql postgresql-contrib
Install Postgis.
sudo add-apt-repository ppa:gwibber-daily/ppasudo apt-get updatesudo apt-get install postgresql-9.3-postgis-2.1sudo apt-get install postgresql-server-dev-9.3
create database in Postgresql
createuser -U postgres username -S -D -Rpsql -U postgres -c "alter role username with password 'passhere';"createdb -U postgres -T template_postgis -O username dbname
if you do not have the template_postgis in the postgresql thenswitch to user postgres and run
sudo su postgrescreatedb template_postgiscreatelang plpgsql template_postgis
Now for creating the extansions
psql -d dbname -c "CREATE EXTENSION postgis;"psql -d dbname -c "CREATE EXTENSION postgis_topology;"