简体   繁体   中英

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:

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.

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.

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 :( .

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.

There is a typo in the LD_LIBRARY_PATH you typed, and tensorflow read. I see that you have usr/local/cuda... instead of /usr/local/cuda (Note the / in the beginning of the path)

Usually, for me the following LD_LIBRARY_PATH is sufficient after installing cuda using the runfile installer from nvidia. export LD_LIBRARY_PATH=/usr/local/cuda:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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