2017-03-09 41 views
-1

我是相对较新的postgres和postgis,我试图从一个名为坐标的列检索数据库中的数据,以及这些坐标距离点(x,y)的我用这个查询:Postgis错误:无法加载库“postgis-2.3.so”

SELECT * FROM myTable 
WHERE ST_DWithin(
Geometry(coordinates), 
Geometry(ST_MakePoint(5,5)), 
800); 

我得到了一个错误:

ERROR: could not load library 
"/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so": 
dlopen(/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/posgis-2.3.so, 10): 
Symbol not found: _GEOSMinimumClearance 
Referenced from: 
/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so 
Expected in: flat namespace 
in 
/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so 

我已经解决了安装GEOS然后凸出以前的问题,但现在我不能解决这个问题之一。

请帮忙。

回答

0

看起来您似乎已经安装了需要比您安装的GEOS更高版本的GEOS版本的PostGIS。

您的PostGIS引用了GEOS功能GEOSMinimumClearance,但在您的GEOS库中不存在,所以动态链接器会引发错误。

安装更新版本的GEOS。

+0

我想我有最新版本(3.6.1)我从这里[链接](https://trac.osgeo.org/geos) –

0

很遗憾,我无法找出问题的原因,我想这是因为同时安装了多个版本的postgre和postgis。

但是我找到了解决方案!我跟着这个guide