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
/usr/pgsql-9.3/share/contrib/
however, when I run
CREATE EXTENSION postgis;
I receive
ERROR: could not open extension control file "/usr/pgsql-9.3/share/extension/postgis.control": No such file or directory
the tutorials (#1, #2) I have used don't show any steps between installing PostGIS and creating the extension.
What am I missing?
PostGIS is an extension to PostgreSQL for storing and managing spatial information. To learn more about PostGIS, see PostGIS.net . Starting with version 10.5, PostgreSQL supports the libprotobuf 1.3. 0 library used by PostGIS for working with map box vector tile data.
Right click on the database name listed under the server cascade list, you will see an option "Create Script" - click on it. CREATE EXTENSION postgis; Look at the icons at the top - you will see a RUN icon/button - looks like a "play" icon. Click on it.
UPDATE: the TEAM has just released the postgis.2.1.0-3 RPM package that solve the issue: now the extension is available:
/usr/pgsql-9.3/share/extension/postgis.control
END UPDATE. [...]
I resolved compiling POSTGIS from source. This is the step-by-step for CentOS 6.4 64bit:
wget http://download.osgeo.org/postgis/source/postgis-2.1.0.tar.gz
tar xvf postgis-2.1.0.tar.gz
cd postgis-2.1.0
./configure --with-pgconfig=/usr/pgsql-9.3/bin/pg_config --without-raster
make
make comments
make install
make install-comments
su - postgres
cd /usr/pgsql-9.3/share/contrib/postgis-2.1/
psql -d postgres -f postgis.sql
psql -d postgres -f spatial_ref_sys.sql
psql -d postgres -f postgis_comments.sql
psql -d postgres -f topology.sql
psql -d postgres -f topology_comments.sql
The postgis2_93 RPM provided by http://yum.pgrpms.org/ is missing extension support. I reported this to Devrim earlier this week and he has been attempting to fix it.
http://svn.pgrpms.org/changeset/299
Hopefully the next push of RPMS to the website resolves this.
Update: postgis2_93-2.1.0-3 was released, which solved this issue but placed a rpm requirement for gdal 1.9, which EPEL does not provide. I got it from ELGIS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With