NVCC "No command 'nvcc' found"

Hi Guys, I’m new to CUDA.

I finished downlaoding the Nvidia Driver, the Nvidia Toolkit and Nvidia SDK for CUDA, and I get this problem when I try to compile my excercises :


usrblabla@ubuntu:/usr/local/cuda/bin$ nvcc
No command ‘nvcc’ found, did you mean:
Command ‘ncc’ from package ‘nemerle’ (universe)
Command ‘nvlc’ from package ‘vlc-nox’ (universe)
nvcc: command not found

I read at the CUDA manual that when you have to use nvcc to compile the programs. This is pretty wierd, because apparnetly it can’t find it.

Any ideas? Suggestions?

From that directory, run “./nvcc” and not “nvcc”.
Most shells default to not including the current path in the search path in order to prevent accidental problems or vulnerabilities like including a malicious executable named “cat” in a writable directory and waiting for a priviged user to accidentally invoke it.

Likely you want to add /usr/local/cuda/bin to your PATH variable in your .bashrc or whatever your shell is.

How do I add " /usr/local/cuda/bin" to my PATH variable in your .bashrc or whatever shell I’m using??

What is a path variable? ANd how do I know what shell I’m using?? (Sry bout the questions, I’m kind of a Newb at linux Ubuntu 9.10)

thanks!

This is going to sound a bit rough, so I apologise for it in advance: Save yourself a lot of wasted time and frustration and give up trying to use Ubuntu 9.10 now. It isn’t supported with CUDA yet, and requires rather complex modifications to the default installation to get CUDA to work. From the sounds of things, you do not have the necessary technical understanding to be able to do that.

If your objective is to get CUDA working with the minimum effort, then start by using a supported Linux distribution, like Ubuntu 9.04. Then spend some time with the Ubuntu guide familiarising yourself with the operating system, and if you haven’t done any C program compilation under Unix/Linux before, find yourself some tutorial information from the 'net or a book on C and the gnu toolchain and work through that until you can understand how the shell environment interacts with the compilation tools and executable applications, and have at least a basic understanding of how gnu make works.

Unfortunately the CUDA development process in Linux requires a reasonable working knowledge of all of the things I mentioned in the previous paragraph. If you don’t already posses that, you will struggle to get anything done with CUDA on Linux.

In the file .bashrc (in your home directory, google for what that is …), add:

export LD_LIBRARY_PATH=/usr/local/cuda/lib

   export PATH=$PATH:/usr/local/cuda/bin

logout … and login again

Thanks guys! Now I’m compiling, and it’s work great for now!