LD_LIBRARY 和 ldd:无法打开共享对象文件,尽管它存在

LD_LIBRARY 和 ldd:无法打开共享对象文件,尽管它存在

当我尝试在 postgresql 数据库中启用 postgis 时,它告诉我:

ERROR:  could not load library "/home/nadai/compiled/postgres/lib/postgis-2.2.so": libproj.so.10: cannot open shared object file: No such file or directory

我的 LD_LIBRARY_PATH 是:

/home/nadai/compiled/proj/lib/:/home/nadai/compiled/spatialindex/lib/:/home/nadai/compiled/gtest/lib/:/home/nadai/compiled/sqlite/:/home/nadai/compiled/gdal/lib/:/home/nadai/compiled/geos/lib/:/home/nadai/compiled/postgres/lib/:/home/nadai/compiled/readline/lib/:/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH

而我有这个:

ldd /home/nadai/compiled/postgres/lib/postgis-2.2.so
linux-vdso.so.1 =>  (0x00007fff55985000)
libgeos_c.so.1 => /home/nadai/compiled/geos/lib/libgeos_c.so.1 (0x00007fb375bc1000)
libproj.so.10 => /home/nadai/compiled/proj/lib/libproj.so.10 (0x00007fb375960000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fb3755d5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb375210000)
libgeos-3.5.0.so => /home/nadai/compiled/geos/lib/libgeos-3.5.0.so (0x00007fb374e68000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb374b64000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb37494e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb37472f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb374429000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb374225000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb37400b000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fb373de9000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb376094000)

所需文件 (/home/nadai/compiled/proj/lib/libproj.so.10) 存在,并且它是 /home/nadai/compiled/proj/lib/libproj.so.10.0.0 的符号链接。因此我检查了32 位与 64 位问题但我有:

file /home/nadai/compiled/proj/lib/libproj.so.10.0.0 
/home/nadai/compiled/proj/lib/libproj.so.10.0.0: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=6cf84de4cd8a6d702042dafa9cf3568aed011795, not stripped

file /home/nadai/compiled/postgres/lib/postgis-2.2.so
/home/nadai/compiled/postgres/lib/postgis-2.2.so: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=96af5ffb6691712582874fe90b5e4b47fa3acab7, not stripped

你觉得问题出在哪里?我快疯了

PS:(Postgis 在我的 Linux 主目录中安装并编译。)

相关内容