Friday 15 September 2017

Postgis installation error


I am using fedora machine. I want to install postgis on my system. So this is what I have done



  1. Installed Postgresql and supporting packages using YUM.

  2. Created directory /sources to put all the necessary packages for postgis.

  3. successfully installed geos,libxml & proj using ./config,make,make install.

  4. successful in make & make install of postgis.


But when I give "make check" I am getting the following error(I have already started the postgres server):


[root@localhost sources]# cd postgis/


[root@localhost postgis]# ls

postgis-1.5.0SVN postgis-1.5.0SVN.tar.gz

[root@localhost postgis]# cd postgis-1.5.0SVN

[root@localhost postgis-1.5.0SVN]# make check

make -C liblwgeom


make[1]: Entering directory `/sources/postgis/postgis-1.5.0SVN/liblwgeom'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/liblwgeom'

make -C postgis

make[1]: Entering directory `/sources/postgis/postgis-1.5.0SVN/postgis'


Makefile.pgxs:17: warning: overriding recipe for target `install'
/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:92: warning: ignoring old recipe for
target `install'

Makefile.pgxs:63: warning: overriding recipe for target `installdirs'
/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:140: warning: ignoring old recipe for
target `installdirs'

Makefile.pgxs:82: warning: overriding recipe for target `uninstall'

/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:164: warning: ignoring old recipe for
target `uninstall'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/postgis'

make -C liblwgeom/cunit check

make[1]: Entering directory `/sources/postgis/postgis-1.5.0SVN/liblwgeom/cunit'


WARNING:

configure was unable to find CUnit which is required for unit testing.
In order to enable unit testing, you must install CUnit and then re-run configure.

make[1]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/liblwgeom/cunit'

make -C regress check


make[1]: Entering directory `/sources/postgis/postgis-1.5.0SVN/regress'

make -C ../postgis REGRESS=1 DESTDIR=/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install install

make[2]: Entering directory `/sources/postgis/postgis-1.5.0SVN/postgis'

Makefile.pgxs:17: warning: overriding recipe for target `install'
/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:92: warning: ignoring old recipe for target `install'

Makefile.pgxs:63: warning: overriding recipe for target `installdirs'

/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:140: warning: ignoring old recipe for target `installdirs'

Makefile.pgxs:82: warning: overriding recipe for target `uninstall'
/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:164: warning: ignoring old recipe for target `uninstall'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/mkinstalldirs '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/lib'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 755 postgis-1.5.so '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/lib/postgis-1.5.so'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./../spatial_ref_sys.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 uninstall_postgis.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis_upgrade_15_minor.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'

/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis_upgrade_14_to_15.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 postgis_upgrade_13_to_15.sql '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/share/contrib/postgis-1.5'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 755 postgis-1.5.so '/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/lib/postgis-1.5.so'

make[2]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/postgis'

make -C ../loader REGRESS=1 DESTDIR=/sources/postgis/postgis-1.5.0SVN/regress/00-regress-install install

make[2]: Entering directory `/sources/postgis/postgis-1.5.0SVN/loader'


Makefile:108: warning: overriding recipe for target `clean'
/usr/lib/pgsql/pgxs/src/makefiles/pgxs.mk:211: warning: ignoring old recipe for target `clean'
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c pgsql2shp /sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/bin
/bin/sh /usr/lib/pgsql/pgxs/src/makefiles/../../config/install-sh -c shp2pgsql /sources/postgis/postgis-1.5.0SVN/regress/00-regress-install/bin

make[2]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/loader'
sed 's,$libdir,/sources/postgis/postgis-1.5.0SVN/regress/00-regress-
install/lib,g' ../postgis/postgis.sql > postgis.sql

psql: could not connect to server: No such file or directory

Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Creating spatial db postgis_reg

createdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

createlang: could not connect to database postgis_reg: could not connect to server: No such file or directory Is the server running locally and accepting

connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

dropdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?


Something went wrong (no postgis installed in postgis_reg).
For details, check /tmp/pgis_reg_5204/regress_log

make[1]: *** [check] Error 1

make[1]: Leaving directory `/sources/postgis/postgis-1.5.0SVN/regress'

make: *** [check] Error 2

6.Even with the error, i continued to create template_postgis db from postgresql shell:

On giving the command: psql template_postgis -U postgres postgis/postgis.sql I am getting the folowing error:

psql:postgis/postgis.sql:6859: NOTICE: type "geography" is not yet defined
DETAIL: Creating a shell type definition.
CREATE FUNCTION
psql:postgis/postgis.sql:6865: NOTICE: argument type geography is only a shell
CREATE FUNCTION
CREATE FUNCTION
CREATE TYPE
psql:postgis/postgis.sql:6893: NOTICE: type "gidx" is not yet defined

DETAIL: Creating a shell type definition.
CREATE FUNCTION
psql:postgis/postgis.sql:6899: NOTICE: argument type gidx is only a shell
CREATE FUNCTION
psql:postgis/postgis.sql:7744: NOTICE: aggregate geomunion(geometry) does not exist, skipping
DROP AGGREGATE
psql:postgis/postgis.sql:7745: NOTICE: aggregate st_geomunion(geometry) does not exist, skipping
DROP AGGREGATE
psql:postgis/postgis.sql:7746: NOTICE: aggregate accum_old(geometry) does not exist, skipping
DROP AGGREGATE

psql:postgis/postgis.sql:7747: NOTICE: aggregate st_accum_old(geometry) does not exist, skipping
DROP AGGREGATE
psql:postgis/postgis.sql:7750: NOTICE: function box2d_overleft(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7751: NOTICE: function box2d_overright(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7752: NOTICE: function box2d_left(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7753: NOTICE: function box2d_right(box2d,box2d) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7754: NOTICE: function box2d_contain(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7755: NOTICE: function box2d_contained(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7756: NOTICE: function box2d_overlap(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7757: NOTICE: function box2d_same(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7758: NOTICE: function box2d_intersects(box2d,box2d) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7759: NOTICE: function st_box2d_overleft(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7760: NOTICE: function st_box2d_overright(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7761: NOTICE: function st_box2d_left(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7762: NOTICE: function st_box2d_right(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7763: NOTICE: function st_box2d_contain(box2d,box2d) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7764: NOTICE: function st_box2d_contained(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7765: NOTICE: function st_box2d_overlap(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7766: NOTICE: function st_box2d_same(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7767: NOTICE: function st_box2d_intersects(box2d,box2d) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7768: NOTICE: function st_addbbox(geometry) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7769: NOTICE: function st_dropbbox(geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7770: NOTICE: function st_hasbbox(geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7771: NOTICE: function cache_bbox() does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7772: NOTICE: function st_cache_bbox() does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7773: NOTICE: function transform_geometry(geometry,text,text,pg_catalog.int4) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7774: NOTICE: function collector(geometry,geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7775: NOTICE: function st_collector(geometry,geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7776: NOTICE: function geom_accum(geometry[],geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7777: NOTICE: function st_geom_accum(geometry[],geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7778: NOTICE: function collect_garray(geometry[]) does not exist, skipping
DROP FUNCTION

psql:postgis/postgis.sql:7779: NOTICE: function st_collect_garray(geometry[]) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7780: NOTICE: function geosnoop(geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7781: NOTICE: function jtsnoop(geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7782: NOTICE: function st_noop(geometry) does not exist, skipping
DROP FUNCTION
psql:postgis/postgis.sql:7783: NOTICE: function st_max_distance(geometry,geometry) does not exist, skipping
DROP FUNCTION

-bash-4.1$

Answer



It looks like the regression tests failed to connect to the local postgres install, so it wasn't able to install the postgis schema and functions. So later, when it tried to run the tests, it just failed.


Seems it seems you are building from trunk, did you do:


./autogen.sh
./configure
./make
sudo make install

and then to install PostGIS in a db:



createdb yourdatabase
createlang plpgsql yourdatabase
psql -d yourdatabase -f postgis.sql
psql -d yourdatabase -f postgis_comments.sql
psql -d yourdatabase -f spatial_ref_sys.sql

That should work - and if it doesn't, you have a bad version of trunk or some pre-requisite is missing.


I would also check that you can connect to postgres using psql from the command line.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...