尝试在Ubuntu 16.04上安装caffe时出错

时间:2016-11-07 18:38:16

标签: ubuntu deep-learning caffe ubuntu-16.04

当我运行make all命令时,我在大约1-2分钟后向我发出此错误:

/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

这是什么意思,我该如何解决?我已经安装了hdf5。

1 个答案:

答案 0 :(得分:0)

我不知道你是否还在搜索它,但我遇到了类似的问题,可以在这次讨论的帮助下修复它。 BVLC/caffe issue。 所以基本上你必须运行这个脚本:

find . -type f -exec sed -i -e 's^"hdf5.h"^"hdf5/serial/hdf5.h"^g' -e 's^"hdf5_hl.h"^"hdf5/serial/hdf5_hl.h"^g' '{}' \;

然后,更改下面的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

我希望它有所帮助:)