0

I am trying to install cuda on my ubuntu machine. I followed instructions from https://developer.nvidia.com/cuda-downloads to install the base installer for the cuda toolkit, which installs the cuda-toolkit-12-6 package. However when I try to check the cuda compiler version with nvcc --version it says "Command 'nvcc' not found, but can be installed with: sudo apt install nvidia-cuda-toolkit"

What am I missing here and what is the difference between these packages?

My main goal is to have cuda setup on ubuntu, I think I'm close but I'm fairly new at configuring packages like this.

1
  • 2
    This may be of interest, including section 13. The cuda-toolkit package refers to "whatever is the latest available cuda toolkit". The cuda-toolkit-12-6 package refers to "cuda toolkit 12.6, even if there is a newer version available". Commented Aug 12, 2024 at 21:36

1 Answer 1

1

You need to check if the CUDA toolkit binary path is included in the PATH environment variable. If you install the toolkit on default path, you can check it in /usr/local/cuda directory.

You can check if /usr/local/cuda/bin is included in the $PATH variable or not. Once you include it you can run the nvcc --version command.

To answer your question regarding difference between cuda-toolkit-12-6 package and nvidia-cuda-toolkit, the first once is from NVIDIA official website and the second one is from apt package manager mostly used by Debian based Linux distribution. It is easier to manage a package with APT like upgrading, downgrading or removing a package but there is a chance that it will not have updated version which was released by NVIDIA.

You can have multiple version of CUDA toolkit in a system if you try to install by downloading the package from official website, I'm not sure if we can do that same with the package manager.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.