BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.03k stars 18.7k forks source link

libcaffe.so: cannot open shared object file: No such file or directory #6828

Open arianaa30 opened 5 years ago

arianaa30 commented 5 years ago

I was trying to compile and run a Caffe code repo located here, which I compiled using Cmake and make (also in the repo). So apparently it comes from Caffe which I built from source code. I have OpenCV 3.4.7 installed, but I don't know why when running the executable, it picks on the version:

error while loading shared libraries: libopencv_core.so.3.1: cannot open shared object file: No such file or directory

I see the followings are already in /usr/local/lib:

/usr/local/lib/libopencv_core.so.4.1.1
/usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_core.so.3.4
/usr/local/lib/libopencv_core.so.4.1
/usr/local/lib/libopencv_core.so.3.4.7

It's more shared files than this. And when doing make, I see following warnings regarding them:

[100%] Linking CXX executable DeepVideoSummExample
/usr/bin/ld: warning: libboost_system.so.1.58.0, needed by /home/user/Downloads/caffe/build/lib/libcaffe.so, may conflict with libboost_system.so.1.61.0
/usr/bin/ld: warning: libopencv_core.so.3.1, needed by /home/user/Downloads/caffe/build/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_imgproc.so.3.1, needed by /home/user/Downloads/caffe/build/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_imgcodecs.so.3.1, needed by /home/user/Downloads/caffe/build/lib/libcaffe.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread.so.1.58.0, needed by /home/user/Downloads/caffe/build/lib/libcaffe.so, may conflict with libboost_thread.so.1.61.0

But how to solve this problem? Why it looks for only 3.1? Where does this number come from?! I don't see anywhere 3.1 being hardcoded.