简体   繁体   English

Tensorflow GPU 安装 Ubuntu 16.04 错误 (libcuda.so not found)

[英]Tensorflow GPU installation Ubuntu 16.04 Error (libcuda.so not found)

I have installed the gpu version of tensorflow but when I try to import it I get the following error message:我已经安装了 tensorflow 的 GPU 版本,但是当我尝试导入它时,我收到以下错误消息:

I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:116] Couldn't open CUDA library libcuda.so.1. LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: sep-GS60-2QE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: Permission denied: could not open driver version path for reading: /proc/driver/nvidia/version
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1066] LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1067] failed to find libcuda.so on this system: Failed precondition: could not dlopen DSO: libcuda.so.1; dlerror: libnvidia-fatbinaryloader.so.367.57: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally

I have followed the installation guide from the tensorflow website, and have made sure that I have installed Cuda and CudNN correctly.我遵循了 tensorflow 网站上的安装指南,并确保我已经正确安装了 Cuda 和 CudNN。

I have tried creating sym-links from a libcuda.so that I found in my system to the cuda directory as suggested on other posts on the nvidia's website as well but they did not help.我曾尝试从libcuda.so创建libcuda.so链接,我在我的系统中找到了指向 cuda 目录的libcuda.so链接,正如 nvidia 网站上的其他帖子所建议的那样,但它们没有帮助。

I have also set the parameters in ~/.bashrc to export LD_LIBRARY_PATH="usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" and export CUDA_HOME="/usr/local/cuda" but still no luck :( .我还在 ~/.bashrc 中设置了参数来export LD_LIBRARY_PATH="usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"export CUDA_HOME="/usr/local/cuda"但是仍然没有运气:(。

It would be most helpful if anyone could help me get this sorted as it is a crucial part of my project to run the code on my gpu.如果有人可以帮助我进行排序,那将是最有帮助的,因为在我的 gpu 上运行代码是我项目的关键部分。

There is a typo in the LD_LIBRARY_PATH you typed, and tensorflow read.你输入的LD_LIBRARY_PATH有错别字,tensorflow 读取。 I see that you have usr/local/cuda... instead of /usr/local/cuda (Note the / in the beginning of the path)我看到你有usr/local/cuda...而不是/usr/local/cuda (注意路径开头的/

Usually, for me the following LD_LIBRARY_PATH is sufficient after installing cuda using the runfile installer from nvidia.通常,对我来说,在使用 nvidia 的运行文件安装程序安装 cuda 后,以下 LD_LIBRARY_PATH 就足够了。 export LD_LIBRARY_PATH=/usr/local/cuda:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM