Ubuntu16.04下 caffe make all时报错:
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:502: recipe for target ‘.build_release/lib/libcaffe.so’ failed
make: * [.build_release/lib/libcaffe.so] Error 1
解决办法如下:
1)首先检查自己的hdf5是否安装成功:sudo apt-get install libhdf5-serial-dev,如果显示libhdf5-serial-dev is already the newest version则证明安装成功,跳转下一步;
2)尝试修改Makefile.config文件下的LIBRARY_DIRS,具体实现为:
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
更多技术细节可参考:https://groups.google.com/forum/#!topic/caffe-users/gOLL29NmTwA