Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql PostGIS 2.0.0安装GEOS问题_Postgresql_Postgis - Fatal编程技术网

Postgresql PostGIS 2.0.0安装GEOS问题

Postgresql PostGIS 2.0.0安装GEOS问题,postgresql,postgis,Postgresql,Postgis,正在尝试在Ubuntu 11.10上安装PostGIS 2.0.0。我基本上遵循了这里的OSGeo说明:。我建立了GEOS 3.3.3。如果在终端中键入geos config--version,则返回3.3.3 我可以毫无问题地运行/configure和make/configure以以下内容结束: PostGIS is now configured for x86_64-unknown-linux-gnu -------------- Compiler Info -------------

正在尝试在Ubuntu 11.10上安装PostGIS 2.0.0。我基本上遵循了这里的OSGeo说明:。我建立了GEOS 3.3.3。如果在终端中键入
geos config--version
,则返回
3.3.3

我可以毫无问题地运行
/configure
make
<代码>/configure以以下内容结束:

 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
时,生成失败,最后出现以下情况:

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\u reg/regression\u 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设置数据库时,我遇到了类似的问题:

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造成的。就我所知,我只有一个。有什么想法吗?

不久前我在写这些说明时遇到了这个问题。我尝试过修复它,但放弃了,因此,
maketest
有一个已知的限制。(我很想找出测试中的问题并重新打开记录单,那里有任何指针。可能与Makefile有关,因为它混合了GEOS和GDAL的版本。)


尽管“make test”失败,但您的安装应该不会出现此问题,因此我将继续执行下一步并进行安装。

PostGIS正在尝试从不同的geos库加载符号,而不是从编译时使用的geos库加载符号。在系统上搜索GEO,将其全部删除并重新编译

我认为这是因为postgis认为这些库位于服务器上的不同位置,而不是它们的实际位置。我从UbuntuGIS得到的软件包也有同样的错误。它们已安装到/usr/lib,但出于某种原因,postgis正在/usr/local/lib中查找它们。不管怎样,我运行了'ldconfig'并再次运行了测试,结果很好