12

I'm trying to install Tensorflow GPU version and I'm stuck at this. I've installed nvidia-cuda-toolkit by running

 sudo apt install nvidia-cuda-toolkit

and it downloaded fine. But i'm unable to locate this libcudart.so

Please specify which gcc nvcc should use as the host compiler. [Default is /usr/bin/gcc]: /usr/bin/gcc
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 
Please specify the location where CUDA  toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda
Invalid path to CUDA  toolkit. /usr/local/cuda/lib64/libcudart.so cannot be found

How can I solve this?

3 Answers3

7

Try this

locate libcudart.so

if nothing is found, update the cache with sudo updatedb and try again.

Zheng Qu
  • 781
  • 6
  • 22
3

According to apt-file, libcudart is installed in:

/usr/lib/x86_64-linux-gnu/

This is for Ubuntu 14.04. Since you didn't put in details of your system, I assumed you were using Ubuntu since you were using apt. The CUDA installer from nvidia's website defaults the installation location to

/usr/local/cuda-7.0

with a symlink to

/usr/local/cuda

That's why the installer defaulted to /usr/local/cuda

merelyMark
  • 367
  • 3
  • 9
  • I tagged Xubuntu, i recently upgraded to 16.04 –  Jun 15 '16 at 05:47
  • 1
    I'd suggest you use the Nvidia installer rather than the pre-rolled package from Debian/apt. I understand the appeal of "sudo apt-get install nvidia-cuda-toolkit" but most people (and therefore tutorials) seem to assume the installation directory is /usr/local. – merelyMark Jun 15 '16 at 20:36
-1

It would probably be in

/usr/local/cuda/lib64/

If you are using anaconda, then you can search it in

$ANACONDA_PATH/envs/$ENV_NAME/lib/
yeachan park
  • 154
  • 2
  • 4