ldd & shared object error Linux - how to troubleshoot?

243 views Asked by At

I'd like to learn how to troubleshoot the following error:

ERROR:  could not load library "/usr/pgsql-11/lib/postgis-3.so": /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib/libproj.so.15)

Related:

$ ldd /usr/pgsql-11/lib/postgis-3.so
    linux-vdso.so.1 =>  (0x00007fffdd426000)
    libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x00007f2937933000)
    libproj.so.15 => /usr/local/lib/libproj.so.15 (0x00007f293744d000)
    libjson-c.so.2 => /usr/lib64/libjson-c.so.2 (0x00007f2937242000)
    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f2936ed8000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00007f2936cc2000)
    libm.so.6 => /usr/lib64/libm.so.6 (0x00007f29369c0000)
    libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f29367bc000)
    libSFCGAL.so.1 => /usr/lib64/libSFCGAL.so.1 (0x00007f2935cf9000)
    libc.so.6 => /usr/lib64/libc.so.6 (0x00007f293592b000)
    libgeos-3.8.1.so => /usr/local/lib/libgeos-3.8.1.so (0x00007f2935558000)
    libstdc++.so.6 => /usr/local/lib/../lib64/libstdc++.so.6 (0x00007f293517f000)
    libgcc_s.so.1 => /usr/local/lib/../lib64/libgcc_s.so.1 (0x00007f2934f67000)
    libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x00007f2934c4a000)
    libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f2934a2e000)
    liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f2934808000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f2937e73000)
    libCGAL.so.11 => /usr/lib64/libCGAL.so.11 (0x00007f29345e0000)
    libCGAL_Core.so.11 => /usr/lib64/libCGAL_Core.so.11 (0x00007f29343a7000)
    libmpfr.so.4 => /usr/lib64/libmpfr.so.4 (0x00007f293414c000)
    libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f2933ed4000)
    libboost_date_time-mt.so.1.53.0 => /usr/lib64/libboost_date_time-mt.so.1.53.0 (0x00007f2933cc3000)
    libboost_thread-mt.so.1.53.0 => /usr/lib64/libboost_thread-mt.so.1.53.0 (0x00007f2933aac000)
    libboost_system-mt.so.1.53.0 => /usr/lib64/libboost_system-mt.so.1.53.0 (0x00007f29338a8000)
    libboost_serialization-mt.so.1.53.0 => /usr/lib64/libboost_serialization-mt.so.1.53.0 (0x00007f293363c000)
    librt.so.1 => /usr/lib64/librt.so.1 (0x00007f2933434000)

Also:

$ echo $PATH
/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
$ echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64

When I compiled Postgis the target was /usr/local so I'm puzzled why the error mentions /lib64/libstdc++.so.6

Any pointers or help would be appreciated, I'd like to understand what else I should try/do.

0

There are 0 answers