本文介绍了PostGIS 2.0.0安装GEOS问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在Ubuntu 11.10上安装PostGIS 2.0.0.我基本上遵循了在这里找到的OSGeo指令: http://trac.osgeo.org/postgis/Wiki/UsersWikiPostGIS20Ubuntu1110src .我建立了GEOS 3.3.3.如果在终端中键入geos-config --version,则会返回3.3.3.

Trying to install PostGIS 2.0.0 on Ubuntu 11.10. I've basically followed the OSGeo instructions found here: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS20Ubuntu1110src. I built GEOS 3.3.3. If I type geos-config --version into the terminal, I am returned 3.3.3.

我可以毫无问题地运行./configuremake. ./configure结尾:

I can run ./configure and make without issue. ./configure ends with:

 PostGIS is now configured for x86_64-unknown-linux-gnu

-------------- Compiler Info -------------
 C compiler:           gcc -g -O2
 C++ compiler:         g++ -g -O2

-------------- Dependencies --------------
 GEOS config:          /usr/local/bin/geos-config
 GEOS version:         3.3.3
 GDAL config:          /usr/local/bin/gdal-config
 GDAL version:         1.9.0
 PostgreSQL config:    /usr/bin/pg_config
 PostgreSQL version:   PostgreSQL 9.1.3
 PROJ4 version:        47
 Libxml2 config:       /usr/bin/xml2-config
 Libxml2 version:      2.7.8
 JSON-C support:       no
 PostGIS debug level:  0
 Perl:                 /usr/bin/perl

--------------- Extensions ---------------
 PostGIS Raster:       enabled
 PostGIS Topology:     enabled

-------- Documentation Generation --------
 xsltproc:             /usr/bin/xsltproc
 xsl style sheets:
 dblatex:
 convert:
 mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd

一切看起来不错,对不对?但这就是问题所在.当我运行make test时,构建最终会失败,

All looks good, right? But here's the problem. When I run make test, the build fails with this at the end:

Creating spatial db postgis_reg
createlang: language "plpgsql" is already installed in database "postgis_reg"
Preparing spatial db postgis_reg

 Something went wrong during db initialization (core module).
 For details, check /tmp/pgis_reg/regress_log

make[1]: *** [check] Error 1
make[1]: Leaving directory `/home/anthony/Downloads/postgis-2.0.0/regress'
make: *** [check] Error 1

内部/tmp/pgis_reg/regress_log是:

SET
BEGIN
psql:/home/anthony/Downloads/postgis-2.0.0/regress/00-regress-install/share/contrib/postgis/postgis.sql:69: ERROR:  could not load library "/home/anthony/Downloads/postgis-2.0.0/regress/00-regress-install/lib/postgis-2.0.so": /home/anthony/Downloads/postgis-2.0.0/regress/00-regress-install/lib/postgis-2.0.so: undefined symbol: GEOSRelatePatternMatch

我试图忽略该问题并继续运行sudo make install,但是当我使用psql -d infinitydb -f postgis.sql设置数据库时,我遇到了类似的问题:

I've tried to ignore the issue and go forward, running sudo make install but when I get to setting up my db with psql -d infinitydb -f postgis.sql I get a similar problem:

SET
BEGIN
psql:postgis.sql:69: ERROR:  could not load library "/usr/lib/postgresql/9.1/lib/postgis-2.0.so": /usr/lib/postgresql/9.1/lib/postgis-2.0.so: undefined symbol: GEOSRelatePatternMatch

我在网上四处张望,发现另一个遇到GEOSRelatePatternMatch问题的人,但他的原因是安装了多个GEOS.据我所知,我只有一个.有什么想法吗?

I've looked around on the net, found one other person with the GEOSRelatePatternMatch problem but his was due to multiple GEOS installs. As far as I'm aware, I only have one. Any ideas?

推荐答案

PostGIS试图从另一个geos库中加载符号,然后再从中编译符号.在系统上搜索 geos ,将其全部删除并重新编译.

PostGIS is trying to load the symbols from a different geos library then the one it was compiled with. Search for geos on your system, remove them all and recompile.

这篇关于PostGIS 2.0.0安装GEOS问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 12:14