caffe训练出错:build/tools/caffe: error while loading shared libraries: libhdf5_hl.so.100: cannot open s

已经参考我的博文:https://blog.****.net/weixin_41770169/article/details/86744336,进行了路径设置:

/usr/lib/x86_64-linux-gnu

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/yanghuiyu/.pyenv/versions/anaconda2-5.3.1/lib" >> ~/.bashrc

sudo ldconfig

 

但是,caffe训练时,输入如下命令后:

sudo build/tools/caffe train -solver examples/myExample/solver.prototxt

报错:

build/tools/caffe: error while loading shared libraries: libhdf5_hl.so.100: cannot open shared object file: No such file or directory

 

(1)先看版本中是否有这个库:

locate libhdf5_hl.so.100

caffe训练出错:build/tools/caffe: error while loading shared libraries: libhdf5_hl.so.100: cannot open s

发现:/home/yanghuiyu/.pyenv/versions/anaconda2-5.3.1/lib/libhdf5_hl.so.100,这个路径是存在的。

 

(2)再看,链接的是否是这个库:

ldd build/tools/caffe

caffe训练出错:build/tools/caffe: error while loading shared libraries: libhdf5_hl.so.100: cannot open s

发现链接的就是(1)中看到的库

(3)那为什么还会报错:经过查资料和实验,发现如下指令调用训练,则不会报错:

./build/tools/caffe train --solver=examples/my_simple_image/cifar/cifar10_quick_solver.prototxt

 

参考:https://blog.****.net/billbliss/article/details/73612063

           https://www.cnblogs.com/alexcai/p/5469436.html