没有根的咖啡:/usr/bin/ld:找不到-lxxxx

caffe without root: /usr/bin/ld: cannot find -lxxxx

我尝试在 linux 系统上安装没有 root 的 caffe。我找到了这样做的 this 说明。现在,当我编译 caffe 时,我收到此错误消息:

$make all -j8
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lglog
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
/usr/bin/ld: cannot find -lsnappy
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status
Makefile:563: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed

有人知道如何在没有 root 权限的情况下解决这个问题吗?

您需要安装 caffe 依赖项,然后再执行 make all -j8

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
 sudo apt-get install -y libatlas-base-dev 
 sudo apt-get install -y --no-install-recommends libboost-all-dev
 sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev

我发现了我的错误:

  1. hdf5_hl、hdf5 和 glog 默认编译成 "lib64" 而不是 "lib" 文件夹
  2. snappy 我只是在 "--prefix="
  3. 设置了错误的路径
  4. 在我的 Makefile.config 中,我需要设置 "BLAS := open" 而不是 "BLAS := atlas"