Install PostGIS on your ubuntu 15.10

It took me quite a lot of time to figure out how do you do that! Though it looks like it is just 3 apt get install command, so simple right? but took quite a toll of my life to figure those 3 out. If you are reading this, probably you are also going through something semilar!

>sudo apt-get install postgresql postgresql-contrib postgis
> psql --version
psql (PostgreSQL) 9.5.2

> sudo psql --username=postgres --dbname=jobcue -c "CREATE EXTENSION postgis;"
Password for user postgres:
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory

>sudo apt-get install postgresql-9.5-postgis-2.0

> sudo psql --username=postgres --dbname=jobcue -c "CREATE EXTENSION postgis;"
Password for user postgres:
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory

> sudo apt-get install postgresql-9.5-postgis-scripts
> sudo psql --username=postgres --dbname=jobcue -c "CREATE EXTENSION postgis;"
Password for user postgres:
CREATE EXTENSION

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s