.build_release/tools/caffe: error while loading shared libraries: libhdf5_hl.so.10: cannot open shared object file: No such file or directory
This means the C loader can not find the file libhdf5_hl.so.10
I found some clues online. Not sure if each solution gives the same lucky bucks. You can get some ideas from them though.
On Linux environment, usually the loader looks for the library file in path:
and other directories when you define for compilation.
As a result, some ideas come out….
Copy the library files to the Linux lib path.
cp /aaa/bbb/ccc/libhdf5_hl.so.10 /usr/lib/ ldconfig
(The actual destination varies.)
Our example shows the loader looks for libhdf5_hl.so.10. Sometimes libhdf5_hl.so.10 is not the real library file. Say the real library file is /xxx/yyy/zzz/libhdf5_hl.so.10.1.0
We can create a symlink to the real file.
ln -s /xxx/yyy/zzz/libhdf5_hl.so.10.1.0 /usr/lib/libhdf5_hl.so.10 ldconfig
If the target file libhdf5_hl.so.10 is located in a special path like /opt/mmm/nnn/, we can set this path in system environment LD_LIBRARY_PATH
Edit ~/.bashrc or ~/.bash_profile
export LD_LIBRARY_PATH=/opt/mmm/nnn:$LD_LIBRARY_PATH ldconfig
Please don’t forget the “ldconfig” command when you make any change. It triggers the loader to re-scan the lib content.