could not load library "/usr/pgsql-10/lib/postgis-2.5.so": /usr/pgsql-10/lib/postgis-2.5.so: undefined symbol: GEOSFrechetDistanceDensify I have installed postgresql 10 on centos 7.4 and installed postgis2.5 few months back. The installation was successful and Iam able to use postgis. All of a sudden Iam getting the following error. 

test=# create extension postgis ;
ERROR:  could not load library "/usr/pgsql-10/lib/postgis-2.5.so": /usr/pgsql-10/lib/postgis-2.5.so: undefined symbol: GEOSFrechetDistanceDensify


And ldd on postgis-2.5.so is as follows

lib]# ldd postgis-2.5.so 
    linux-vdso.so.1 =&gt;  (0x00007ffcc03ef000)
    libgeos_c.so.1 =&gt; /usr/geos36/lib64/libgeos_c.so.1 (0x00007f7a7d766000)
    libproj.so.12 =&gt; /usr/proj49/lib/libproj.so.12 (0x00007f7a7d4fd000)
    libjson-c.so.2 =&gt; /lib64/libjson-c.so.2 (0x00007f7a7d2f2000)
    libxml2.so.2 =&gt; /lib64/libxml2.so.2 (0x00007f7a7cf88000)
    libm.so.6 =&gt; /lib64/libm.so.6 (0x00007f7a7cc86000)
    libSFCGAL.so.1 =&gt; /lib64/libSFCGAL.so.1 (0x00007f7a7c1b7000)
    libc.so.6 =&gt; /lib64/libc.so.6 (0x00007f7a7bdea000)
    libgeos-3.6.3.so =&gt; /usr/geos36/lib64/libgeos-3.6.3.so (0x00007f7a7ba3c000)
    libstdc++.so.6 =&gt; /lib64/libstdc++.so.6 (0x00007f7a7b735000)
    libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x00007f7a7b51f000)
    libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007f7a7b303000)
    libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007f7a7b0ff000)
    libz.so.1 =&gt; /lib64/libz.so.1 (0x00007f7a7aee9000)
    liblzma.so.5 =&gt; /lib64/liblzma.so.5 (0x00007f7a7acc3000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f7a7dc56000)
    libCGAL.so.11 =&gt; /usr/lib64/libCGAL.so.11 (0x00007f7a7aa9b000)
    libCGAL_Core.so.11 =&gt; /usr/lib64/libCGAL_Core.so.11 (0x00007f7a7a862000)
    libmpfr.so.4 =&gt; /usr/lib64/libmpfr.so.4 (0x00007f7a7a607000)
    libgmp.so.10 =&gt; /usr/lib64/libgmp.so.10 (0x00007f7a7a38f000)
    libboost_date_time-mt.so.1.53.0 =&gt; /usr/lib64/libboost_date_time-mt.so.1.53.0 (0x00007f7a7a17e000)
    libboost_thread-mt.so.1.53.0 =&gt; /usr/lib64/libboost_thread-mt.so.1.53.0 (0x00007f7a79f67000)
    libboost_system-mt.so.1.53.0 =&gt; /usr/lib64/libboost_system-mt.so.1.53.0 (0x00007f7a79d63000)
    libboost_serialization-mt.so.1.53.0 =&gt; /usr/lib64/libboost_serialization-mt.so.1.53.0 (0x00007f7a79af7000)
    librt.so.1 =&gt; /usr/lib64/librt.so.1 (0x00007f7a798ef000)


The function GEOSFrechetDistanceDensify seems to be added in version 3.7 of Geos as in link below &amp; I have geos 3.6. Is this the reason for this error?.
https://trac.osgeo.org/geos/browser/git/NEWS?rev=3.7.0

Please help me to get the issue resolved.
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