您的位置:首页 > 其它

配F-RCN遇到的问题(hdf5.h: 没有那个文件或目录)及解决

2018-01-24 14:58 405 查看
问题:

src/caffe/net.cpp:8:18: fatal error: hdf5.h: 没有那个文件或目录

compilation terminated.

Makefile:575: recipe for target '.build_release/src/caffe/net.o' failed
make: *** [.build_release/src/caffe/net.o] Error 1

解决方案:


Step 1

在Makefile.config文件的第85行,添加/usr/include/hdf5/serial/ 到 INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include

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


Step 2

在Makefile文件的第173行,把 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


如果还没解决,则:

find /usr-iname"*hdf5.h*"

/usr/include/hdf5/serial/hdf5.h

export CPATH="/usr/include/hdf5/serial/"

然后 make clean

make -j8
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐