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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've followed the instructions here to install PostGIS 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… but I can't find the postgis.sql file they mentioned anywhere. – Patrick64 Jan 4 '14 at 20:56
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, 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 '14 at 19:48
@Patrick64 You should still be able to use the 9.3 PGDG packages. – Craig Ringer Jan 6 '14 at 0:10
Ok, I'll give it a go upgrading to the new version. Thanks! – Patrick64 Jan 7 '14 at 0:37
Why is this answer "Accepted"? Did it solve the problem? – CodyBugstein Sep 10 '14 at 14:28

Your Answer


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.