Running Create Extension postgis gives ERROR could not open extension control file?
I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem.
I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as expected. I have run
yum install postgis2_93
and I can see the files in
however, when I run
CREATE EXTENSION postgis;
ERROR: could not open extension control file "/usr/pgsql-9.3/share/extension/postgis.control": No such file or directory
What am I missing?
What you're missing is 'postgis.control' :) The question is 'why' or 'where'. First, see if you even have a copy by running 'find /usr -name postgis.control'. If you don't, then it's a packaging problem with the brand new postgis2_93 package that needs to be fixed.
Oh, you can see the files (including 'postgis.control'?) share/contrib, but from the error message pgsql is looking in share/extension. There might have been a change in default extension location from 9.2 to 9.3 that the packager missed.
@PaulRamsey - I ran `find /usr -name postgis.control` and it is not present. I can see some files in share/contrib; however, postgis.control is not among them... what do you suggest I do? wait for a fix, make my own, something else?
@PaulRamsey - I just verified that `postgis-2.1.so` is present in `/lib` does this mean I can just make my own postgis.control file?
If you can find a postgis.sql file, you can run that into your database (and the spatial_ref_sys.sql file) to manually spatialize your database. Report the missing control file to the packager, that's a big problem.