根據https://blog.csdn.net/luozhichengaichenlei/article/details/104441935來安裝caffe
在https://gitee.com/luo_zhi_cheng/retinaface_caffe項目中,使用make來編譯時用到了lcaffe.so,出現錯誤:/usr/bin/ld: cannot find -lcaffe
解決辦法參考:https://www.cnblogs.com/zhming26/p/6164131.html
1、將庫文件所在的路徑加入到 /etc/ld.so.conf 尾部,即複製 /home/lzc/Desktop/detection/caffe-ssd/caffe-ssd/build/lib 到 /etc/ld.so.conf 的最後一行,關閉之後 sudo ldconfig。
2、gedit ~/.bashrc 然後在最後添加 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/lzc/Desktop/detection/caffe-ssd/caffe-ssd/build/lib ,關閉之後 source ~/.bashrc
3、此時make應該可以成功,若不成功,則第二步換成 export LIBRARY_PATH=$LIBRARY_PATH:/home/lzc/Desktop/detection/caffe-ssd/caffe-ssd/build/lib 再試試。