在 Python 上安装 Caffe 深度学习框架时遇到问题:
当我在 caffe 目录运行 make
命令时,它说
hdf5.h: 没有这样的目录
我完成的步骤:
更新和升级我的 Ubuntu 服务器
安装 Python 2.7
运行 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
原文由 kelvin 发布,翻译遵循 CC BY-SA 4.0 许可协议
您安装的 Ubuntu 是什么版本?尝试这个。在你的
Makefile.config
尝试附加/usr/include/hdf5/serial/
到INCLUDE_DIRS
:and rename
hdf5_hl
andhdf5
tohdf5_serial_hl
andhdf5_serial
in theMakefile
:有关错误修复的更多信息,请 点击此处。