6
$ 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?!!

2
  • @JosephR. it's pre-compiled binary for ARM
    – kun
    Commented Oct 2, 2013 at 16:25
  • 1
    Looks like the library is compiled for a different ABI. Please post the output of file /path/to/libOpenNI2.so ./SimpleRead and ldd /path/to/libOpenNI2.so SimpleRead. Which arm architecture variant is this, and how was SimpleRead compiled? Commented Oct 2, 2013 at 23:46

1 Answer 1

4

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .