Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA: nvcc cannot be detected though installed

I successfully installed CUDA 7.0 on ubuntu(ami instance), but when I typed 'nvcc -version', it told me that

The program 'nvcc' is currently not installed. You can install it by typing:
apt-get install nvidia-cuda-toolkit
You will have to enable the component called 'multiverse'

That's weird since the installation was successful in /usr/local and I've added CUDA 7.0 to my path. I've also tried rebooting my instance then typing in the same command and it didn't work. I'm also sure that the driver for my GPU is correctly. (same error occurs when I use theano to run nvcc test)

like image 531
Yiqun Liu Avatar asked Nov 15 '15 09:11

Yiqun Liu


1 Answers

Actually, it's the case that I set environment variable in a wrong way. Instead of using

$ export PATH=/usr/local/cuda-7.0/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH

as it's recommended, I choose to edit /etc/profile, which is not recommended.

like image 140
Yiqun Liu Avatar answered Nov 02 '22 12:11

Yiqun Liu