/usr/bin/ld: cannot find -lopenblas 编译caffe问题解决
在编译用于训练openpose的caffe时,make之后产生如下错误:LD -o .build_release/lib/libcaffe.so.1.0.0-rc3/usr/bin/ld: cannot find -lopenblascollect2: error: ld returned 1 exit statusMakefile:570: recipe for target '.bu...
在编译用于训练openpose的caffe时,make之后产生如下错误:
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:570: 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
错误显示找不到这个openblas相关的库。
解决办法:
(1)在/usr/lib/中查看这个库相关的文件是否存在:
ll libopenblas*
显示:
-rw-r--r-- 1 root root 31962416 Apr 19 2016 libopenblasp-r0.2.18.so
lrwxrwxrwx 1 root root 23 Apr 19 2016 libopenblas.so.0 -> libopenblasp-r0.2.18.so
发现没有后缀为.so的文件,只有一个后缀为.so.0的,而在编译的时候动态库只能是后缀为.so的。
(2)创建后缀为.so的软连接
sudo ln -s libopenblasp-r0.2.18.so libopenblas.so
注意此时需要sudo权限
之后再次编译,问题解决。
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐

所有评论(0)