I cant install cuda 6.5 in ubuntu 16.04
I used the deb from 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?
02 Answers
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-devInstall 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
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" >> ~/.bashrcReboot and test everything works
sudo rebootMake 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] [2] [3] [4]
Here is the easy way to install the Nvidia CUDA toolkit and proprietary driver that matches your Ubuntu 16.04 system:
- Open synaptic (or maybe another package manager) and go to
Settings -> Repositories. On theAdditional Driverstab 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. - Also in synaptic install the
nvidia-cuda-toolkitpackage. This has to be compatible with the driver that you are using. By installing both from the Ubuntu repositories ensures they are compatible. - You may need to set an environment path in your
.bashrcto point to/usr/lib/nvidia-cuda-toolkit/. The libraries are installed in/usr/lib/nvidia-*where * is the driver version number. - Run
nvidia-smito check everything worked.
This is more-or-less the same answer as here.