Ubuntu16.04下 caffe make all時報錯:make: *** [.build_release/lib/libcaffe.so] Error 1

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章