[postgis-users] Postgis 2.4 Error: undefined symbol: proj_crs_get_datum_ensemble

Jakub Wartak Jakub.Wartak at tomtom.com
Tue Jul 6 06:37:10 PDT 2021


Hi,

> # SELECT postgis_full_version() ;
> ERROR:  could not load library "/usr/pgsql-9.6/lib/rtpostgis-2.4.so":
> /usr/gdal32/lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble
> CONTEXT:  SQL statement "SELECT public.postgis_gdal_version()"
> PL/pgSQL function postgis_full_version() line 33 at SQL statement
> [..]
> /usr/gdal32/lib/libgdal.so.28 | grep proj
>         libproj.so.19 => /usr/proj71/lib/libproj.so.19 (0x00007fb368a4f000)
> [..]
> /usr/proj71/lib/libproj.so.19
> /usr/proj71/lib/libproj.so.19.1.1
> /usr/proj72/lib/libproj.so.19
> /usr/proj72/lib/libproj.so.19.2.1
> [..]
> $ rpm -qa | grep proj
> proj71-7.1.1-3.rhel7.x86_64
> proj-4.8.0-4.el7.x86_64
> proj72-7.2.1-1.rhel7.x86_64

GDAL wants 'libproj.so.19' , but you have two of them installed which might confuse ld.so. Maybe try to verify - using nm(1), readelf -s (1) or objdump (1)- which of the libproj.so.19 has "proj_crs_get_datum_ensemble" function exported and then uninstall the opposite one (so uninstall proj71 as it might confuse the dynamic loader, so that it switches to proj72?). Example:

[XXXXXXXXXXXXXXXXX ~]$ readelf --wide -s /usr/proj72/lib/libproj.so.19 | grep proj_crs_get_datum
  1420: 00000000001d2c20   725 FUNC    GLOBAL DEFAULT   11 proj_crs_get_datum_forced
  2287: 00000000001d5270   428 FUNC    GLOBAL DEFAULT   11 proj_crs_get_datum_ensemble
  2477: 00000000001d2a70   428 FUNC    GLOBAL DEFAULT   11 proj_crs_get_datum

Also you may want to play with ldconfig.

-J.


More information about the postgis-users mailing list