Error trying to start Create Postment

I installed PostgreSQL 9.x and PostGIS 1.5 / 2.0 several times and have never encountered this problem.

I just got a new CentOS 6.3 server, and I have Postgres 9.3, as expected. I launched

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 get

 ERROR: could not open extension control file "/usr/pgsql-9.3/share/extension/postgis.control": No such file or directory 

the tutorials ( # 1 , # 2 ) that I used do not show any steps between installing PostGIS and creating an extension.

What am I missing?

+8
postgresql centos postgis
source share
4 answers

The postgis2_93 RPM provided by http://yum.pgrpms.org/ lacks extension support. I reported this to Devrim earlier this week and he was trying to fix it.

http://svn.pgrpms.org/changeset/299

Hopefully the next step of RPMS on the site will resolve this.

Update: A postgis2_93-2.1.0-3 post was posted that solved this problem but placed an rpm requirement for gdal 1.9 which EPEL does not provide. I got it from ELGIS .

+2
source share

UPDATE: TEAM just released the postgis.2.1.0-3 RPM package, which solves the problem: the extension is now available:

 /usr/pgsql-9.3/share/extension/postgis.control 

END UPDATE. [...]

I decided to compile POSTGIS from the source. This is 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 
+3
source share

For Postgresql 9.6, try the following commands:

 yum install postgis yum install postgis-client yum install postgresql96-contrib 
0
source share

I have the same problem, so I fixed it using the steps below

my environment

Windows 10, postgres sql 11 server and pgAdmin 4

  1. download the binary file from (the zip file is not an installer) http://download.osgeo.org/postgis/windows/pg11/postgis-bundle-pg11-2.5.3x64.zip
  2. Unzip the zip file to a folder
  3. change the settings in "makepostgisdb_using_extensions.bat"
  4. Run the file as administrator if the above steps give an error, manually copy the files based on "makepostgisdb_using_extensions.bat" copy the file in the Xcopy section, for example. xcopy bin *. * "% PGBIN%" is equal

extract_folder \ bin in C: \ Program Files \ PostgreSQL \ 11 \ pgAdmin 4 \ bin

follow each xcopy command, copy the corresponding files 5. Restart the postgre server. 6. Follow the 4 steps in the above sequence 7. or you can create an extension for GIS through the pgAdmin user interface

========= Good luck

0
source share

All Articles