ubuntu16.04 安装caffe时出现 .build_release/tools/caffe: error while loading shared libraries: libcudart.so.10.0: cannot open shared object file: No such file or directory

原博客搬移到:https://blog.csdn.net/u013171226/article/details/107680277

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

在Ubuntu上面搭建caffe环境,搭建完成之后运行sudo make runtest -j8失败,提示错误为:.build_release/tools/caffe: error while loading shared libraries: libcudart.so.10.0: cannot open shared object file: No such file or directory

这个库在安装cuda的时候已经安装了,只不过在默认路径下面找不到这个库,因此执行下面的操作

sudo cp /usr/local/cuda-10.0/lib64/libcudart.so.10.0 /usr/local/lib/libcudart.so.10.0 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcublas.so.10.0 /usr/local/lib/libcublas.so.10.0 && sudo ldconfig
sudo cp /usr/local/cuda-10.0/lib64/libcurand.so.10.0 /usr/local/lib/libcurand.so.10.0 && sudo ldconfig

解决了上面的三个问题之后,继续测试发现找不到cudnn库,于是执行下面的操作:
sudo cp /usr/local/cuda/lib64/libcudnn.so.7 /usr/local/lib/libcudnn.so.7 && sudo ldconfig

posted @ 2020-03-03 12:08  cumtchw  阅读(881)  评论(0编辑  收藏  举报