Note: Last question did not work on my system How do I Install CUDA on Ubuntu 18.04?

I installed the CUDA toolkit on Ubuntu 18.04, but the installation does not appear complete. How can I install CUDA properly on Ubuntu 18.04?

I followed the advice on a prior question and have nvcc installed.

When I run nvcc -V, I have CUDA compilation tools, release 9.1, V9.1.85.

Now I am searching for the bin directory to test the installation. See Section 7.0: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions

The only two cuda folders I find with locate are under the anaconda3 directory. Neither of these have a bin folder.

  • If you type "which nvcc" you get the location in which it is installed. That is the bin you are looking for, e.g which nvcc outputs /usr/local/vm/cuda-8.0/bin/nvcc on my system. – ubfan1 Dec 16 '18 at 22:48
  • nvcc was not under the cuda install. It was by itself. I have since installed CUDA, but it ruined my graphics device driver. Still working on a proper install. – yellowjacket05 Dec 18 '18 at 3:05

I suggest you to use "find" command instead of "locate".

I assume you installed via apt and because it has become a native package, CUDA is installed in a rather non-standard way.

They are installed into the root system paths: /usr/bin, /usr/include, /usr/lib we need to emulate the old way for it to work. The following commands should do the trick:

sudo mkdir -p /usr/local/cuda /usr/local/cuda/extras/CUPTI /usr/local/cuda/nvvm
sudo ln -s /usr/bin /usr/local/cuda/bin
sudo ln -s /usr/include /usr/local/cuda/include
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/local/cuda/lib64
sudo ln -s /usr/local/cuda/lib64 /usr/local/cuda/lib
sudo ln -s /usr/include /usr/local/cuda/extras/CUPTI/include
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/local/cuda/extras/CUPTI/lib64
sudo ln -s /usr/lib/nvidia-cuda-toolkit/libdevice /usr/local/cuda/nvvm/libdevice

Resource: https://medium.com/@asmello/how-to-install-tensorflow-cuda-9-1-into-ubuntu-18-04-b645e769f01d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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