I cant install cuda 6.5 in ubuntu 16.04

I used the deb from https://developer.nvidia.com/cuda-toolkit-65 Its supposed to add a PPA. It did it once then I removed it after the sudo update complained about not being able to read from the PPA.

Then I tried to add the PPA using the deb again and now the PPA is not added. Is there another way of installing cuda toolkit 6.5?


2 Answers 2


EDIT: I found a way!

install dependencies

sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev

Install the nvidia display driver

Get the appropriate driver download here. Let's say the latest version is 352.41.

sudo chmod +x NVIDIA-Linux-x86_64-352.41.run
sudo ./NVIDIA-Linux-x86_64-352.41.run --accept-license --no-questions --disable-nouveau --no-install-compat32-libs
rm NVIDIA-Linux-x86_64-352.41.run
sudo echo 'GRUB_CMDLINE_LINUX="nomodeset"' >> /etc/default/grub
sudo update-grub
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration  # flags enable OC and fan controls.

install cuda

cd && wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
rm cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-6-5 # skip reading the entire agreement by pressing ctrl+c
sudo usermod -a -G video $USER
echo "" >> ~/.bashrc
echo "export PATH=/usr/local/cuda-6.5/bin:$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc

Reboot and test everything works

sudo reboot

Make the deviceQuery sample. This is used to verify cuda works cd /usr/local/cuda/samples/1_Utilities/deviceQuery && sudo make

If you see all of your cards listed, and the last line says "Result = PASS" you're good to go. /usr/local/cuda/samples/1_Utilities/deviceQuery/deviceQuery


Original answer:

I just spent a few hours trying to figure this out myself. I finally got it installed, but now I constantly get variations of this error:

In file included from /usr/local/cuda-6.5/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda-6.5/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!

I've Google'd around and there are hacks to kinda make it work a little, but eventually you run into a brick wall. I'm giving up and getting a video card that supports the latest CUDA. Simply put, Nvidia just doesn't support Ubuntu 16.04+ with CUDA 6.5 >:C

If you won't heed my warning and are determined to install CUDA 6.5 on Ubuntu 16.04, here are some of the references I used:

[1] https://askubuntu.com/a/149224/422690 [2] https://askubuntu.com/a/278840/422690 [3] https://stackoverflow.com/a/25216137/4212158 [4] https://groups.google.com/forum/#!topic/torch7/WaNmWZqMnzw


Here is the easy way to install the Nvidia CUDA toolkit and proprietary driver that matches your Ubuntu 16.04 system:

  1. Open synaptic (or maybe another package manager) and go to Settings -> Repositories. On the Additional Drivers tab install the proprietary Nvidia driver. It may offer you more than one or you may need to run an apt update/synaptic reload after adding the restricted software repository.
  2. Also in synaptic install the nvidia-cuda-toolkit package. This has to be compatible with the driver that you are using. By installing both from the Ubuntu repositories ensures they are compatible.
  3. You may need to set an environment path in your .bashrc to point to /usr/lib/nvidia-cuda-toolkit/. The libraries are installed in /usr/lib/nvidia-* where * is the driver version number.
  4. Run nvidia-smi to check everything worked.

This is more-or-less the same answer as here.

Not the answer you're looking for? Browse other questions tagged .