6

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)

talonmies
  • 70,661
  • 34
  • 192
  • 269
Yiqun Liu
  • 503
  • 2
  • 5
  • 14

1 Answers1

21

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.

Yiqun Liu
  • 503
  • 2
  • 5
  • 14
  • 5
    The PATH variable resets once the terminal window is closed. To permanently set the PATH variable: (1) Run the command `gedit ~/.profile`, (2) Add the line `export PATH=$PATH:/usr/local/cuda-7.0/bin` to the bottom and save, (3) Log out and log in again. – Safwan Feb 03 '17 at 14:28