【Caffe】fatal error: hdf5.h: No such file or directory错误的解决办法

在源码编译安装caffe时出现这个错误如果是没有按照hdf5,则

sudo apt-get install libhdf5-dev

如果安装之后还是报错,那么打开Makefile.config,找到INCLUDE_DIRS,在后面添加/usr/include/hdf5/serial ,如下所示:

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

LIBRARY_DIRS,在后面添加/usr/lib/x86_64-linux-gnu/hdf5/serial,如下所示:

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

重新执行make all。

你可能感兴趣的:(Caffe)