【问题标题】:Hdf5 error while installing the caffe on Ubuntu 16.04?在 Ubuntu 16.04 上安装 caffe 时出现 HDf5 错误?
【发布时间】:2018-08-25 22:37:22
【问题描述】:

我正在尝试在 Ubuntu 16.04 中安装 caffe。我按照in the docs 中提到的步骤进行操作。一切都很好,但我的机器安装了 CUDA 工具包 9,但文档说版本 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

【问题讨论】:

    标签: caffe caffe2


    【解决方案1】:

    我通过安装 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/"
    

    【讨论】: