天天看點

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

繼續閱讀