2

Installed postgresql 9.4 following this tutorial using the method of already compiled pkg. All seems fine with postgres installation.

testdb=# SELECT name, setting FROM pg_settings where category='File Locations';
       name        |                 setting                  
-------------------+------------------------------------------
 config_file       | /etc/postgresql/9.4/main/postgresql.conf
 data_directory    | /var/lib/postgresql/9.4/main
 external_pid_file | /var/run/postgresql/9.4-main.pid
 hba_file          | /etc/postgresql/9.4/main/pg_hba.conf
 ident_file        | /etc/postgresql/9.4/main/pg_ident.conf
(5 rows)

Then tried to install postgis 2.2.0 folowing the steps at this trac page (im fairly new with *nix env's and this build from source stuff stills confusing me a lot so go gentle with me) .

  1. So downloaded postgis-2.2.0.tar.gz in a /temp_postgis and untarred .
  2. List item Folowed steps for install from source in this trac for debian whezzypage

  3. During the install it requested many librarys like geos , proj4 and others that i installed.

Now the problem when in try to create postgis extension it gives me an error and i can see the extension at the pgadmin as option to install extension on databases.

receiving the following error:

testdb=# CREATE EXTENSION postgis;
ERROR:  could not open extension control file "/usr/share/postgresql/9.4/extension/postgis.control": No such file or directory
testdb=# 

Any clues what could have go wrong ? Regards.

EDIT 1: After make check -

PATH is /usr/lib/postgresql/9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Checking for shp2pgsql ... found
Checking for pgsql2shp ... found
TMPDIR is /tmp/pgis_reg
psql: FATAL:  role "root" does not exist
Creating database 'postgis_reg' 
createdb: could not connect to database template1: FATAL:  role "root" does not exist
psql: FATAL:  role "root" does not exist
Loading PostGIS into 'postgis_reg' 
 failed (Error encountered loading /temp_postgis/postgis-2.2.0/regress/00-regress-install/share/contrib/postgis/postgis.sql: /tmp/pgis_reg/regress_log)
Makefile:265: recipe for target 'check' failed
make[1]: *** [check] Error 1
make[1]: Leaving directory '/temp_postgis/postgis-2.2.0/regress'
GNUmakefile:16: recipe for target 'check' failed
make: *** [check] Error 1

Now on the other side- i was able to run the postgis.sql and spatial_ref_sys.sql on pgadmin sql window, all ended successfully , i can now see postgis extension as option to install postgis via pgadmin and pslql - recreated a few other db's and installed postgis and seems to be fine . Now the question - if make check tests failed should i worry ? i belleive so :-)

  • Not sure why this was voted off-topic. Anyway if you didn't compile with gdal support, which means you have no raster, then CREATE EXTENSION can't be used. check in usr/share/contrib/postgis-2.2 and you should find postgis.sql and spatial_ref_sys.sql you can use to install – LR1234567 Oct 23 '15 at 8:02
  • that's what i was afraid , i have no usr/share/contrib/postgis-2.2 folder , this seems bad – Jorge Vidinha Oct 23 '15 at 14:02
  • Did you do make install? Maybe you compiled but didn't install. – LR1234567 Oct 23 '15 at 16:26
  • Dont remember if did , so did it again but still have no contrib dir. At the end of make install received this 2 lines > make[2]: Leaving directory '/temp_postgis/postgis-2.2.0/extensions/postgis_topology' > make[1]: Leaving directory '/temp_postgis/postgis-2.2.0/extensions' Expected or something else – Jorge Vidinha Oct 23 '15 at 16:43
  • That looks all fine. BTW meant usr/share/postgresql/9.4/contrib/postgis-2.2 folder. What does your ./configure statement look like – LR1234567 Oct 24 '15 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.