建造 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/

相關內容