问题
I am trying to create postgis 3.0 extension on postgresql12 on centos7 (both are installed using yum native rpms)
yum install postgis30_12.x86_64
but i am getting different errors with GEOS. currently the error i am getting is
postgres=# create extension postgis;
ERROR: could not load library "/usr/pgsql-12/lib/postgis-3.so": /usr/pgsql-12/lib/postgis-3.so: undefined symbol: GEOSCoordSeq_getXY
geos-config --version 3.8.0
回答1:
The PostGIS binary you are using was built with a GEOS version that is incompatible with the one installed. You have to either install a different GEOS library or a different PostGIS.
Normally, such an incompatibility should be made obvious by using a different library version. GEOS seems to be sloppy here.
回答2:
i have resolved the issue by running ldd libgeos_c.so.1 to find which one is being used by postgresql12 and manually replaced it with the one that comes after installing geos38 and the create extension succeeded.
来源:https://stackoverflow.com/questions/59731448/postgis-extension-undefined-symbol-geoscoordseq-getxy