【发布时间】:2017-03-01 17:56:24
【问题描述】:
我在尝试运行 caffe 的 make 文件时收到此错误消息。
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:567: 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
我已经尝试按照这些instructions 进行符号链接,但无济于事。我已经阅读了关于 hdf5 的其他帖子并查看了 /usr/lib/x86_64-linux-gnu 中的符号链接。
drwxr-xr-x 3 root root 4096 Aug 29 16:43 hdf5
-rw-r--r-- 1 root root 6075302 Apr 5 2016 libhdf5_cpp.a
lrwxrwxrwx 1 root root 21 Apr 5 2016 libhdf5_cpp.so -> libhdf5_cpp.so.11.0.0
lrwxrwxrwx 1 root root 21 Apr 5 2016 libhdf5_cpp.so.11 -> libhdf5_cpp.so.11.0.0
-rw-r--r-- 1 root root 402080 Apr 5 2016 libhdf5_cpp.so.11.0.0
-rw-r--r-- 1 root root 40108 Apr 5 2016 libhdf5_hl_cpp.a
lrwxrwxrwx 1 root root 24 Apr 5 2016 libhdf5_hl_cpp.so -> libhdf5_hl_cpp.so.11.0.0
lrwxrwxrwx 1 root root 24 Apr 5 2016 libhdf5_hl_cpp.so.11 -> libhdf5_hl_cpp.so.11.0.0
-rw-r--r-- 1 root root 14688 Apr 5 2016 libhdf5_hl_cpp.so.11.0.0
lrwxrwxrwx 1 root root 27 Oct 19 08:59 libhdf5_hl.so -> libhdf5_serial_hl.so.10.0.2
-rw-r--r-- 1 root root 19953086 Apr 5 2016 libhdf5_serial.a
-rw-r--r-- 1 root root 1659560 Apr 5 2016 libhdf5_serial_fortran.a
lrwxrwxrwx 1 root root 32 Apr 5 2016 libhdf5_serial_fortran.so -> libhdf5_serial_fortran.so.10.0.2
lrwxrwxrwx 1 root root 32 Apr 5 2016 libhdf5_serial_fortran.so.10 -> libhdf5_serial_fortran.so.10.0.2
-rw-r--r-- 1 root root 238408 Apr 5 2016 libhdf5_serial_fortran.so.10.0.2
-rw-r--r-- 1 root root 878832 Apr 5 2016 libhdf5_serial_hl.a
-rw-r--r-- 1 root root 515320 Apr 5 2016 libhdf5_serialhl_fortran.a
lrwxrwxrwx 1 root root 34 Apr 5 2016 libhdf5_serialhl_fortran.so -> libhdf5_serialhl_fortran.so.10.0.2
lrwxrwxrwx 1 root root 34 Apr 5 2016 libhdf5_serialhl_fortran.so.10 -> libhdf5_serialhl_fortran.so.10.0.2
-rw-r--r-- 1 root root 80520 Apr 5 2016 libhdf5_serialhl_fortran.so.10.0.2
lrwxrwxrwx 1 root root 27 Apr 5 2016 libhdf5_serial_hl.so.10 -> libhdf5_serial_hl.so.10.0.2
-rw-r--r-- 1 root root 126232 Apr 5 2016 libhdf5_serial_hl.so.10.0.2
-rw-r--r-- 1 root root 3859 Apr 5 2016 libhdf5_serial.settings
lrwxrwxrwx 1 root root 24 Oct 19 08:57 libhdf5.so -> libhdf5_serial.so.10.1.0
我没有发现任何问题。我将如何重新安装 hdf5?
【问题讨论】:
-
这适用于 hdf5 吗?
-
你是从源代码还是通过 apt-get 安装 hdf5?
-
我按照 caffe 的说明用 apt-get 安装了 libhdf5-serial-dev。
-
试试这个命令
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' '{}' \; cd /usr/lib/x86_64-linux-gnu sudo ln -s libhdf5_serial.so.10.1.0 libhdf5.so sudo ln -s libhdf5_serial_hl.so.10.0.2 libhdf5_hl.so