I am using CentOS 7.6 at work. One one server I have PostgreSQL 12 and PostGIS 3 installed from the pgdg12 repo. This is working fine for vector data, but now I would like to use it for raster data as well, but when I run

-bash-4.2[Kartdata]$ psql <database> -c "create extension postgis_raster;"

I get

ERROR: could not load library "/usr/pgsql-12/lib/postgis_raster-3.so": /usr/gdal30/lib/libgdal.so.26: undefined symbol: GEOSMakeValid_r

I have been checking that PostgreSQL, PostGIS, GEOS and GDAL all are the newest versions, but except that PostgreSQL and PostGIS both are from the pgdg12 repo but GEOS and GDAL are from pgdg10 (I have tried to install it from pgdg12, but CentOS is still using pgdg10) everything seems perfect.

Any other ideas where I could look?

bash-4.2[<>]# ls -l /usr/pgsql-12/lib/postgis*
lrwxrwxrwx 1 root root      30 Nov  5 08:28 /usr/pgsql-12/lib/postgis-2.5.so -> /usr/pgsql-12/lib/postgis-3.so
-rwxr-xr-x 1 root root 1067904 Sep 30 12:14 /usr/pgsql-12/lib/postgis-3.so
lrwxrwxrwx 1 root root      37 Nov  5 08:28 /usr/pgsql-12/lib/postgis_raster-2.5.so -> /usr/pgsql-12/lib/postgis_raster-3.so
-rwxr-xr-x 1 root root  862368 Sep 30 12:14 /usr/pgsql-12/lib/postgis_raster-3.so
lrwxrwxrwx 1 root root      39 Nov  5 08:28 /usr/pgsql-12/lib/postgis_topology-2.5.so -> /usr/pgsql-12/lib/postgis_topology-3.so
-rwxr-xr-x 1 root root  552168 Sep 30 12:14 /usr/pgsql-12/lib/postgis_topology-3.so

bash-4.2[<>]# ls -l /usr/gdal30/lib/
total 20664
drwxr-xr-x 2 root root        6 Nov  4 19:34 gdalplugins
lrwxrwxrwx 1 root root       17 Nov  5 08:28 libgdal.so.26 -> libgdal.so.26.0.2
-rwxr-xr-x 1 root root 21156328 Nov  4 19:35 libgdal.so.26.0.2
  • does /usr/pgsql-12/lib/postgis_raster-3.so exist? do the postgres user have read/execute permissions on it? – Ian Turton Jan 30 at 9:51
  • Yes and yes - exists and rx permission – MortenSickel Jan 30 at 10:13
  • what happens if you open psql and run the command directly? – Ian Turton Jan 30 at 10:46
  • Good question - but the same thing happens. – MortenSickel Jan 30 at 11:20
  • is /usr/pgsql-12/lib/postgis_raster-3.so a real file or a soft link to something that doesn't exist? – Ian Turton Jan 30 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.