Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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
share|improve this question
    
Here is a similar post gis.stackexchange.com/questions/71302/… but I can't find the postgis.sql file they mentioned anywhere. –  Patrick64 Jan 4 at 20:56
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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 at 19:48
    
@Patrick64 You should still be able to use the 9.3 PGDG packages. –  Craig Ringer Jan 6 at 0:10
    
Ok, I'll give it a go upgrading to the new version. Thanks! –  Patrick64 Jan 7 at 0:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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