How to install CUDA 6.5 on Ubuntu 14.04

Installing CUDA is becoming increasingly easier on Ubuntu. I think I keep hitting problems because I am usually updating from an older NVIDIA graphics driver or CUDA version. NVIDIA continues to be quite bad at providing error-free upgrades. Anyway, this is what worked for me:

  • Do not try to install any of the NVIDIA drivers or CUDA packages that are in the Ubuntu repositories. I wasted a day with the errors these operations threw up!

  • Uninstall all CUDA packages and NVIDIA drivers you may have on your Ubuntu system.

  • Download the CUDA .deb package for Ubuntu 14.04 from here. For me, it was a cuda-repo-ubuntu1404_6.5-14_amd64.deb file.

  • The .deb file just adds a CUDA repository maintained by NVIDIA. Install this .deb file and update:

$ sudo gdebi cuda-repo-ubuntu1404_6.5-14_amd64.deb
$ sudo apt-get update
  • Installing CUDA now is easy as this:
$ sudo apt-get install cuda

This is a big install, it will install everything including a nvidia-340 driver that actually worked and NVIDIA NSight. After the install, reboot the computer. Your CUDA is ready for work now🙂

Note: I tried this on two systems. On one, it installed without any problem. On the other, it gave an error of unmet dependencies. I have described here how I solved this problem.

Tried with: NVIDIA GeForce GTS 250 and NVIDIA GTX Titan

2 thoughts on “How to install CUDA 6.5 on Ubuntu 14.04”

  1. I tried these directions, and it installed the 352 drivers instead of 340.x. As I’m running an older Tesla S1070 (with (4) C1060 cards using the T10 processor), it requires the 340.x drivers. The application I’m trying to run wants CUDA 6.5, and 6.5 is the newest I can use with this Tesla anyway, from what I can tell (and barely supports it at that).
    So when I boot Ubuntu, it whines about needing 340.x drivers instead of 352, and will not load.
    So then I came across a generic Linux 64-bit driver on NVidia’s website for 340.93, that says “Recommended CUDA toolkit 6.5”, in a .run format. If I run it, it wants me to first uninstall the stuff I installed based on the instructions in this article. If I do that, would I then have the driver, but no toolkit?
    How do I get CUDA 6.5 with 340.x like this article describes? I’m kind of confused as to what the relationship is between the CUDA toolkit and the drivers; are these separate items bundled together, or is there some way I can install them separately? Nowhere can I find a description telling me what the relationship is between each, and how you can install this-CUDA-with-that-driver. Very confusing.




    1. RB: The toolkit always ships with a driver. If your current driver is newer than the toolkit one, it is not installed. If your current driver is older, then toolkit driver is installed. You can also install driver downloaded from NVIDIA website.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s