您的位置:首页 > Web前端

./include/caffe/data_layers.hpp:9:18: fatal error: hdf5.h: No such file or directory

2016-11-29 12:21 736 查看
再次编译,报错:
src/caffe/layers/hdf5_data_layer.cpp:13:18: fatal error: hdf5.h: No such file or directory
 #include "hdf5.h"
记得上面已经安装了hdf5-devel,怎么会出这个错?查看一下,发现yum这个没找到hdf5-devel,所以也就没有安装。
在docs/installion.md中,建议:but we suggest first installing the [Anaconda](https://store.continuum.io/cshop/anaconda/) Python distribution, which provides most of the necessary
packages, as well as the `hdf5` library dependency.

准备安装hdf5: http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.16.tar 解压后:
./configure --prefix=/usr/local/hdf5-1.8.3   ##指定安装路径,否则会默认安装到当前路径下。
make ##4分钟左右

make install

此时,在Makefile.config中增加HDF5_DIRS的路径到搜索路径下:
HDF5_DIRS :=/usr/local/hdf5-1.8.3/
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include $(HDF5_DIRS)/include

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib $(HDF5_DIRS)/lib

看来CAFFE编译是一步一个坑啊。

这个错误表明,我们的hdf5.h这个头文件的路径没有被找到,如果你没有安装HDF5这个文件 ,那当然是找不到的。

再者,就然你安装了这个文件也可能找不到,那么我们怎么办。

我们用locate hdf5.h找到你安装的路径,然后在makefile.conf文件中相应指定就好了。

那么,最终总结的经验就是遇山修路,过水搭桥。

好,接下来继续编译,可能双碰到问题了。哎呀,又一个坑。



***********************CAFFE又一坑**************************

AR -o .build_release/lib/libcaffe.a

LD -o .build_release/lib/libcaffe.so

/usr/bin/ld: cannot find -lcblas

/usr/bin/ld: cannot find -latlas

collect2: error: ld returned 1 exit status

Makefile:493: recipe for target '.build_release/lib/libcaffe.so' failed

make: *** [.build_release/lib/libcaffe.so] Error 1

make: *** Waiting for unfinished jobs....

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