Ubuntu16.04 找不到hdf5.h的问题

搭建caffe环境时,在最后进行 ”$make all”操作时,报错找不到 “hdf5.h”,找了半天原因,于是重新再安装 “hdf5

[html] view plain copy

1.  $ sudo apt-get libhdf5-serial-dev  

 

相应的需要更改"Makefile.config"文件中的包含目录

ctrl+f 找到

INCLUDE_DIRS:=$(PYTHON_INCLUDE)/usr/local/include
然后在后面加上"serial"的包含目录,即:
INCLUDE_DIRS:=$(PYTHON_INCLUDE)/usr/local/include/usr/include/hdf5/serial/
接着需要更改相应的"Makefile"文件,找到
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
就可以了,继续make了。

如果不行,就参考上一步caffe安装过程中对Makefile.config和Makefile修改方式。


猜你喜欢

转载自blog.csdn.net/Lisatiy/article/details/80366386