解决方法:
1.修改 Makefile.config 文件
进入到下载的caffe目录
在 Makefile.config 文件中,按住crtl+f 搜索:INCLUDE_DIRS
注意不是 Makefile.config.example!!!
添加/usr/include/hdf5/serial/ 到 INCLUDE_DIRS后
即原来的:
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
现在变成:
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
2.修改 Makefile 文件
在 Makefile 文件中,按住crtl+f 搜索:LIBRARIES +=
注意不是上面第1步的 Makefile.config!!!
把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial。
即原来的:
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