2

I've followed the instructions here to install PostGIS http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt but when I went to create the extension I got the following error. I'm using PostgreSQL 9.3.2 and Ubuntu 12.04. The extension doesn't appear in the dropdown list on pgadmin3 either.

# create extension postgis;
ERROR:  could not open extension control file "/opt/PostgreSQL/9.3/share/postgresql/extension/postgis.control": No such file or directory
1

1 Answer 1

1

Looks like you have more than one PostgreSQL install. You're connected to a PostgreSQL install from EnterpriseDB, in /opt. This install cannot see, or use, extensions installed into the Ubuntu-packaged PostgreSQL install.

The instructions you followed will have installed PostgreSQL 9.3 from http://apt.postgresql.org/, i.e. PGDG. You should connect to that PostgreSQL install, not the EnterpriseDB one, if you want to use the PostGIS you installed.

You need to either use the system-packaged (PGDG) PostgreSQL install on your system, or install PostGIS separately into the EnterpriseDB-packaged PostgreSQL install using their StackBuilder product.

4
  • Thanks. I tried installing PostGIS via stack builder but it didn't work, so I uninstalled everything postgresql and did sudo apt-get install postgresql-9.1 postgresql-9.1-postgis-2.1 and it worked ok.
    – Patrick64
    Jan 5, 2014 at 19:48
  • @Patrick64 You should still be able to use the 9.3 PGDG packages. Jan 6, 2014 at 0:10
  • Ok, I'll give it a go upgrading to the new version. Thanks!
    – Patrick64
    Jan 7, 2014 at 0:37
  • Why is this answer "Accepted"? Did it solve the problem? Sep 10, 2014 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.