Today, on a production system errors started arising from a Django based application that made use of PostGIS features. All SQL queries that included any geo data were failing. This was on PostgreSQL 9.6 on Centos 7.
could not load library "/usr/pgsql-9.6/lib/postgis-2.4.so": /usr/pgsql-9.6/lib/postgis-2.4.so: undefined symbol: GEOSFrechetDistanceDensify
This error was being reported at a self.cursor.execute
, but it was not clear that it was a local or remote error.
The error was eventually traced to automatic package upgrades on the database server itself — generally not a good idea, but this had gone unnoticed. Yum-cron had installed geos37
as part of an update to postgis24_96
. postgis-2.4.so
however was still linking to the older libgeos-3.6.3.so
instead of libgeos-3.7.0.so
.
The solution turned out to be as simple as yum remove geos36
.