我按照本指南安装了caffe。我正在使用ubuntu 16.04并仅为cpu安装caffe(我没有Nvidia gpu)。
https://chunml.github.io/ChunML.github.io/project/Installing-Caffe-CPU-Only/
但是遇到了以下错误:
LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: cannot find -lhdf5_hl
collect2: error: ld returned 1 exit status
Makefile:572: recipe for target '.build_release/lib/libcaffe.so.1.0.0'
failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
有人可以帮我弄清楚如何通过这个吗?感谢
答案 0 :(得分:0)
/ usr / bin / ld:找不到-lhdf5_hl
-lhdf5_hl
表示libhdf5_hl.so
sudo apt install apt-file
sudo apt-file update
apt-file search libhdf5_hl.so
libhdf5-dev: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so
libhdf5-mpich-dev: /usr/lib/x86_64-linux-gnu/hdf5/mpich/libhdf5_hl.so
libhdf5-openmpi-dev: /usr/lib/x86_64-linux-gnu/hdf5/openmp/libhdf5_hl.so
或使用在线Debian搜索https://packages.debian.org/search?suite=buster§ion=all&arch=any&searchon=contents&keywords=libhdf5_hl.so
答案 1 :(得分:0)
这解决了我的问题
sudo ln -sf libhdf5_serial.so libhdf5.so
sudo ln -sf libhdf5_serial_hl.so libhdf5_hl.so
如何在linux中对文件进行符号链接 - https://stackoverflow.com/a/1951752/6612871