Insatlling CUDA : Failed to add GPGKEY at http://cuda-repo/repos/GPGKEY to apt keys

Solution 1:

Long story short: The DEB file currently linked on the CUDA Toolkit 6.5 page is broken and after fixing becomes equivalent with the 7.0 one.

More precisely, it seems somebody at Nvidia mixed up the file from production testing (containing but an internal network alias) with the one meant for release, which would have pointed to the actual public server.

To see that, fully extract it and run grep -R http, you'll get but references to http://cuda-repo.

You could fix the file (the linked 6.5-14 will update to the equally broken 6.5-19, so let's go with that) with…

mkdir tmp && cd tmp
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-19_amd64.deb
ar p cuda-repo-ubuntu1404_6.5-19_amd64.deb data.tar.gz | tar zx
ar p cuda-repo-ubuntu1404_6.5-19_amd64.deb control.tar.gz | tar zx
sed -i -e 's/cuda-repo\/prodtest/developer.download.nvidia.com\/compute\/cuda\/repos/g' etc/apt/sources.list.d/cuda.list
sed -i -e 's/cuda-repo/developer.download.nvidia.com\/compute\/cuda/g' postinst
tar czf data.tar.gz etc usr
tar czf control.tar.gz conffiles control postinst postrm
ar rv cuda-repo-ubuntu1404_6.5-19_amd64.deb data.tar.gz control.tar.gz
sudo dpkg -i cuda-repo-ubuntu1404_6.5-19_amd64.deb

… but once you use it, you'll find that apt-get install cuda will just try to get the 7.0 one, and that if you (I) had just tried the DEB for 7.0 to begin with, might have noticed that the package has been renamed to cuda-6-5 anyway. Thank you, Nvidia!

Solution 2:

To install nVidia cuda, follow the instaructions:

  1. first download the .run file from here. (you can check for the latest version available here)

  2. Place the downloaded file in your home folder (/home/username/)

  3. now change the tty session with Ctrl+Alt+F1 (before doing this, note down the instructions somewhere else. we are going turn off the GUI session)

  4. Login with your username and password

  5. run this command to turn off the x-server:

sudo service lightdm stop

  1. Run the cuda installer with this command:

sudo ./cuda_*

  1. Follow the instructions of the installer and install cuda development toolkit.

  2. When done, run this command to start xserver again:

sudo service lightdm start

  1. Finally get back to GUI (tty7) by pressing Ctrl+Alt+F7

  2. Please perform a restart and enjoy!



You can skip steps 8, 9, 10 and enter this command to restart directly after installation:

sudo reboot

I did the exact same process and I successfully installed cuda development toolkit. I'm having nVidia GTX 750 1 GB DDR 5.