我正在尝试在Ubuntu 16.04中安装caffe。我按照上面提到的步骤in the docs进行了操作。一切都很好,但是我的机器安装了CUDA工具包9,但doc说的是8 - 希望这不是问题(我猜)。但是当我尝试编译它的caffe repo时,我得到了以下错误 -
usr1@ubox:~/SDK/caffe$ cp Makefile.config.example Makefile.config
usr1@ubox:~/SDK/caffe$ make all
CXX src/caffe/solver.cpp
In file included from src/caffe/solver.cpp:9:0:
./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Makefile:581: recipe for target '.build_release/src/caffe/solver.o' failed
make: *** [.build_release/src/caffe/solver.o] Error 1
答案 0 :(得分:0)
我通过安装libhdf5解决了这个问题,但我认为在文档中没有提到。但是,下面的命令节省了我的一天。 enter link description here
sudo apt-get install libhdf5-10
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-cpp-11
find /usr -iname "*hdf5.h*"
/usr/include/hdf5/serial/hdf5.h
/usr/include/opencv2/flann/hdf5.h
export CPATH="/usr/include/hdf5/serial/"