Debian – shared library not found even with ld.so.conf updated

armdebiandynamic-linkinglibrarieslinux

$ sudo ldconfig -v|grep libOpenNI
355: libOpenNI2.so -> libOpenNI2.so

but when I am executing the program I'm getting

./SimpleRead: error while loading shared libraries: libOpenNI2.so: cannot open shared object file: No such file or directory

Strange?!!

Best Answer

If you run the command ldd ./SimpleRead you can see more details on which dynamic libraries your executable is attempting to use. Additionally you can see where it's looking for on the system to find these dynamic libraries (.so files).

Example

$ ldd /bin/ls
    linux-vdso.so.1 =>  (0x00007ffff6dff000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00000034e8e00000)
    librt.so.1 => /lib64/librt.so.1 (0x00000034e8a00000)
    libcap.so.2 => /lib64/libcap.so.2 (0x0000003d6fe00000)
    libacl.so.1 => /lib64/libacl.so.1 (0x00000034fae00000)
    libc.so.6 => /lib64/libc.so.6 (0x00000034e7200000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00000034e7a00000)
    /lib64/ld-linux-x86-64.so.2 (0x00000034e6e00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00000034e7e00000)
    libattr.so.1 => /lib64/libattr.so.1 (0x00000034f7600000)

References

Related Question