OpenNI / OpenNI2

OpenNI2
Apache License 2.0
431 stars 895 forks source link

error while loading shared libraries: libOpenNI2.so #77

Closed lnegrol closed 10 years ago

lnegrol commented 10 years ago

Hi all, first excuse me for my English.

I'm using Code::Blocks on Linux with OpenCV, OpenNI and NiTE libraries. I'm having some problems I do not know how to fix.

When I build the project, I get:

warning: libOpenNI2.so, needed by ../NiTE-Linux-x86-2.2/Redist/libNiTE2.so, not found (try using-rpath or-rpath-link)

And when I run the project, I get:

/home/jfra/kinect/SistemaOpenNI2 by JFRA v2/bin/Debug/Sistema: error while loading shared libraries: libOpenNI2.so: can not open shared object file: No such file or directory

Process returned 127 (0x7F) execution time: 0.002 s
Press ENTER to continue.

Comment that I have assigned libOpenNI2.so:

Project Build options ...
Linker settings
../OpenNI-Linux-x86-2.2/Redist/libOpenNI2.so

Thank you for your help. A greeting.

lnegrol commented 10 years ago

SOLVED: I've solved, copying the libraries libOpenNI2.so and libNiTE2.so in /usr/local/lib/

Then I executed the command sudo ldconfig and ready.

Thank you for your help. A greeting.

cstewartmaint commented 4 years ago

I came across this while trying to install NITE to run an Xtion PRO on opensuse.

`cam@linux-fsxq ~/D/NITE-Bin-Dev-Linux-x64-v1.5.2.21> sudo ./install.sh Installing NITE


Copying shared libraries... OK Copying includes... OK Installing java bindings... OK Installing module 'Features_1_3_0'... Registering module 'libXnVFeatures_1_3_0.so'... niReg: error while loading shared libraries: libOpenNI.so: cannot open shared object file: No such file or directory cam@linux-fsxq ~/D/NITE-Bin-Dev-Linux-x64-v1.5.2.21> sudo ldconfig cam@linux-fsxq ~/D/NITE-Bin-Dev-Linux-x64-v1.5.2.21> sudo ./install.sh `

I got this error code. I copied the Lib/ directory from the OpenNI package (also came with the linux driver software for Xtion PRO) to my /usr/share/lib and /user/share/lib64 directories.

I ran the sudo ldconfig command and then tried to run the install for NITE again and it worked perfect.

Hope this helps someone else.