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
Check Postgres Version from SQL Shell Type the following SQL statement within the prompt to check the current version: SELECT version(); The resulting output provides the full version and system information for the PostgreSQL server.
Now I can understand why postgresql. conf and other configuration files are stored in /etc/postgresql/9.3/main. After all, /etc is where configuration files are stored in a linux system.
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/ppa
sudo apt-get update
sudo apt-get install postgresql-9.3-postgis-2.1
sudo apt-get install postgresql-server-dev-9.3
create database in Postgresql
createuser -U postgres username -S -D -R
psql -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 then switch to user postgres and run
sudo su postgres
createdb template_postgis
createlang plpgsql template_postgis
Now for creating the extansions
psql -d dbname -c "CREATE EXTENSION postgis;"
psql -d dbname -c "CREATE EXTENSION postgis_topology;"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With