I successfully installed the nvidia driver and toolkit for cuda 5 (but not the samples) on a 64 bit Ubuntu 12.04 box. The samples failed to install even though I previously ran
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
I can't seem to find nvcc. I ran
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:$LD_LIBRARY_PATH
nvcc -v
reports that the compiler is not found:
nvcc -V No command 'nvcc' found, did you mean:
Command 'nvlc' from package 'vlc-nox' (universe)
nvcc: command not found
The getting started guide hasn't been of much help here.
What's going on here? Do I need to install the gpu computing sdk samples to get nvcc?
Best Answer
It looks like you installed
nvcc
but it's not in the executable path.The libraries are located in
/usr/local/cuda-5.0/lib
and/usr/local/cuda-5.0/lib64
, so the executables are probably located in/usr/local/cuda-5.0/bin
. Check in that directory, to see if there is a file callednvcc
. If so, add/usr/local/cuda-5.0/bin
to yourPATH
environment variable.If
nvcc
is not located there, search the entire/usr/local/cuda-5.0
directory. One way to do that is to run the command:Once you find it, you can add the directory that contains it to your
PATH
variable, or you can make a symbolic link to it in a directory that's in yourPATH
, or you can invoke it by its full path name (e.g.,/usr/local/cuda-5.0/someplace/nvcc
).