could not load library "/usr/pgsql-10/lib/postgis-2.5.so": /usr/pgsql-10/lib/postgis-2.5.so: undefined symbol: GEOSFrechetDistanceDensify
Had the same problem on CentOS after an update. I had 3.6 AND 3.7 installed.

$yum list installed | grep geos
geos36.x86_64                           3.6.3-1.rhel7                  @pgdg10
geos37.x86_64                           3.7.0-1.rhel7                  @pgdg10

I had to remove the 3.6:

$yum remove geos36

And restart PostgreSQL

$systemctl restart postgresql-10