3

I am trying to install postgis on ubuntu Ubuntu 12.04.4 LTS.

I search the repo and find a package called postgresql-9.1-postgis. I then installed it:

sudo apt-get install postgresql-9.1-postgis

It also installed the following dependencies:

libgeos-3.2.2 libgeos-c1 libproj0 postgis proj-data

I then thought I could easily do (inside my schema):

CREATE EXTENSION postgis;

But I instead got the wonderful error detailed below:

ERROR:  could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory


********** Error **********

ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory
SQL state: 58P01
Any idea how I can finalize the installation so that I can use the damn extension?

Can anyone help?

Ta

user209247
  • 31
  • 1

1 Answers1

1

This is because of Postgis version. This command installs old version of Postgis.

sudo apt-get install postgresql-9.1-postgis

Install Postgis version 2 from source and try.

Here is official installation guide.

chhantyal
  • 221
  • 2
  • 6