1. 网上有3种解决方式:

  1)这是GitHub的解决方法,链接:https://github.com/tensorflow/tensorflow/issues/5343

  ubuntu安装caffe 解决:build_release/tools/caffe: error while loading shared libraries: libcudart.so.8.0: cannot open shar

  可以看出,这个方法还是有效的。

  2)执行命令:

1 sudo ldconfig /usr/local/cuda/lib64

  ubuntu安装caffe 解决:build_release/tools/caffe: error while loading shared libraries: libcudart.so.8.0: cannot open shar

  这个感觉也还可以!!!

  3)如果上述两种方法仍然没解决,可以试一试笨办法

  出现此类问题,主要是 /usr/local/lib/目录下找不到libcudart.so.8.0这个文件, 该文件可以在usr/local/cuda-8.0/lib64/目录下找到,因此我们通过下面的命令将libcudart.so.8.0这个文件复制一份过去,记得要加sudo权限,否则可能无法复制。
  执行命令:

1 sudo cp /usr/local/cuda-8.0/lib64/libcudart.so.8.0 /usr/local/lib/libcudart.so.8.0 && sudo ldconfig

  这是还会出现

  ./build/tools/caffe: error while loading shared libraries: libcublas.so.8.0: cannot open shared object file:  can not open shared object file: No such file or directory
  ./build/tools/caffe: error while loading shared libraries: libcurand.so.8.0: cannot open shared object file:  can not open shared object file: No such file or directory
  ./build/tools/caffe: error while loading shared libraries: libcudnn.so.6: cannot open shared object file:  can not open shared object file: No such file or directory
  等问题,将命令中黄色标注的相应名称改下就可以了

  执行完毕,就没有错误了!!!