cuda directory

Dear all,

I have a linux machine (debian 9 stretch). I installed cuda via “apt install nvidia-cuda-toolkit”. It seems installation was successful. “nvcc --version” showed the version is 8.0.44.

Now I need to compile another program which asks me the path to cuda directory. However, it seems there is no specific cuda directory from my cuda installation. Please see the results of “dpkg -L nvidia-cuda-toolkit” below.

So my questiton: did I install cuda correctly and completely? which directory should be my “cuda directory”?

Thank you very much.


michael@hpz420:~$ dpkg -L nvidia-cuda-toolkit

NVIDIA doesn’t provide any packages called “nvidia-cuda-toolkit”

packages that start with “nividia-…” are generally created/provided by a third party repository, such as PPA

If you install CUDA using a NVIDIA-provided method and installer, the toolkit will be placed by default in


directory on linux.

Your arrangement of directories with


is not typical for any NVIDIA-provided installer.

I wouldn’t be able to answer any questions about how to use CUDA in this 3rd-party install arrangement.

Thank you very much.

I just searched and it seems NVIDIA provides ubuntu installation version. Does it work for debian? or should I go with general linux version?

Another question: if I install NVIDIA version and leave the “nvidia-cuda-toolkit” version there, will there be any conflict? does NVIDIA version writes anything outside the default /usr/lical/cuda-X.Y directory?

Thanks again!


debian isn’t a supported environment for CUDA development work

So I will go with distribution-independent package.

Can you kindly comment on my second question? Will the package write anything outside the default installation directory?

Thank you very much.

If you install the GPU driver, it will definitely install things outside of /usr/local/cuda

If you only install the CUDA toolkit, I’m not aware of anything written to outside of that directory, but I don’t have an exhaustive list to be certain. Certainly the installer will write to your temp directory for installation purposes. Other than that I am not aware of anything.

I’m not sure what you mean by distribution-independent package. If you are referring to the runfile installer, that makes no claims to be distribution independent. Debian is officially unsupported whether you use a runfile install method or a package manager method.

Thank you very much. Yes I mean runfile package. From installation guide:

The CUDA Toolkit can be installed using either of two different installation mechanisms: distribution-specific packages (RPM and Deb packages), or a distribution-independent package (runfile packages). The distribution-independent package has the advantage of working across a wider set of Linux distributions, but does not update the distribution’s native package management system.

If the runfile package works for ubuntu, I think it probably works for debian as well. Will try…