Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html

What's going on here? Do I need to install the gpu computing sdk samples to get nvcc? :/

share|improve this question
add comment

3 Answers 3

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 called nvcc. If so, add /usr/local/cuda-5.0/bin to your PATH 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:

find /usr/local/cuda-5.0 -name nvcc

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 your PATH, or you can invoke it by its full path name (e.g., /usr/local/cuda-5.0/someplace/nvcc).

share|improve this answer
add comment

In my build (Ubuntu Server 13.10), nvcc ended up in /usr/lib/nvidia-cuda-toolkit (in the 'bin' directory) - adding a symlink to there from /usr/local/cuda fixed up all of my CUDA problems.

sudo ln -s /usr/lib/nvidia-cuda-toolkit /usr/local/cuda

But YMMV.

share|improve this answer
add comment

hope this helps a little

Installing CUDA on Ubuntu

share|improve this answer
1  
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  fossfreedom Dec 29 '12 at 7:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.