构建 Caffe:无法看到 hdf5.h

构建 Caffe:无法看到 hdf5.h

Hello Caffe 是一个深度学习库。在 Ubuntu 15.04 下尝试构建该库时,编译失败并显示以下消息:

:~/App/caffe$ make all

PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/layer_factory.cpp
In file included from ./include/caffe/common_layers.hpp:10:0,
                 from ./include/caffe/vision_layers.hpp:10,
                 from src/caffe/layer_factory.cpp:6:
./include/caffe/data_layers.hpp:9:18: fatal error: hdf5.h: Aucun fichier ou dossier de ce type
 #include "hdf5.h"
                  ^
compilation terminated.
Makefile:512: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1

构建失败似乎是 Ubuntu 特有的。我检查了不同的依赖项。我尝试了不同的解决方法:直接在 Makefile.config 中写入 hdf5.h 的路径,从源代码构建 hdf5...

谢谢你的建议

答案1

安装libhdf5-dev

添加补丁libhdf5Makefile.config

例子:INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/

相关内容