$ 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
References