2

I have a brand new installed Ubuntu 14.04, my laptop has an NVIDIA GEFORCE 740M. I've been following this guide to install CUDA, and right after tyiping:

sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb 

I get an error message

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

I tried what suggested here with no success, and I'm definetely lost right now. How do I fix this problem ?

I tried the same process with the new CUDA 7 and that gave me no errors but some driver problems arose, I'm trying to install CUDA 6.5 because me and a collegue are wroking on the same project and he already has the 6.5 working so I need to adapt (even though I don't think having another version of CUDA can cause any problem). I'd like to solve the GPGKEY problem, but if that's not the case I'll have to do it another way (in this case any hint would be much appreciated).

Keep in mind I tried to install CUDA 6.5 with the .run, there I had no problems but when installing the nvidia-cuda-toolkit it only installed the 5.5 version clearly not compatible with the 6.5. So again, I'm open to any other possibility to make it work. It feels like even if I fix this problem, I'd still have issues getting the nvidia-toolkit 6.5. If you need any other information to help me out, I'll be glad to share it.

1

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.

| improve this answer | |
  • 1
    This almost worked, running dpkg -l | grep -i nvidia it wouldn't show anything, so I had to install it again (sudo apt-get install nvidia-346 in my case). Now nvidia-smi and dpkg -l | grep -i nvidia refer to the same driver. The command nvcc still wouldn't work so I had to update the path as suggested in the official guide. Now everything seems to work just fine. Thanks for the input! – G4bri3l Mar 19 '15 at 0:34
2

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!

| improve this answer | |

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.