我在Python上安装Caffe Deep Learning Framework时遇到了麻烦:
当我在caffe目录下运行make命令时,它说
hdf5.h:no such directory
我已经完成的步骤:
>更新和升级我的Ubuntu服务器
>安装Python 2.7
>让所有依赖项都基于http://caffe.berkeleyvision.org/install_apt.html
>运行cp cp Makefile.config.example Makefile.config
>在Makefile.config中取消注释cpu_only = 1
如果有人能帮助我,我将不胜感激.
错误信息:
CXX src/caffe/util/hdf5.cpp
in file include from src/caffe/util/hdf5.cpp:1:0:
./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
compilation terminated
Makefile:572 recipe for target '.build_release/src/caffe/util/hdf5.o'
failed Make:*** [.build_release/src/caffe/util/hdf5.o] Error 1
解决方法:
你的Ubuntu安装版本是什么?尝试这个.在Makefile.config中尝试将/usr/include / hdf5 / serial /追加到INCLUDE_DIRS:
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
并在Makefile中将hdf5_hl和hdf5重命名为hdf5_serial_hl和hdf5_serial:
--- LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+++ LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
有关错误修复here的更多信息.