Problems Installing CUDA 5.5 DEB on Ubuntu 12.04 64 Bit

I’ve built a new computer with an i7-4770K processor (LGA1150) and a GEFORCE GTX Titan GPU. I’ve installed Ubuntu 12.04 64 Bit with no problems. At this point I have not downloaded any drivers for the GPU. (It is my understanding that a driver will come with the CUDA download) Then, in Terminal, I performed the checks for CUDA compatible GPU, supported Linux, and gcc. All look correct.

Then I did the nvidia uninstall:
$ /usr/bin/nvidia-uninstall
got a response “No such file or directory” as expected because I had not downloaded a driver.

Next it was not clear to me if I had to enable armhf, but I tried it both ways. When I did try it, as written in the CUDA Toolkit Documentation, I got a Permission denied message to the echo command. So, I switched to super user, and reentered the command at the # prompt. I assume it worked, there was no error message, just another # prompt. Then I entered:
# apt-get update
Many things scrolled by, there were some “Failed to fetch” warnings and ended with “E: Some index files failed to download…” Assuming it worked or that I did not need to enable armhf, I proceeded:

I downloaded the DEB file into the Downloads directory, exited super user, and changed directories to the Downloads directory. I entered the dpkg command, and got an “OK” from that. Then I entered:
$ sudo apt-get update
and again many things scrolled by ending with a lot of “Failed to fetch” warnings and “E: Some index files failed to download…”

I continued as if this were normal and entered:
$ sudo apt-get install cuda
Got the message:
“The following packages have unmet dependencies:
cuda : Depends: cuda-5-5 (= 5.5-22) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.”

I don’t know what to do from here.
Is there better documentation somewhere?
Can someone help?

Use the .run installer. It’s available at
Instructions are at
Be sure to remove the nouveau driver if it is present on your system.

I did not see the three asterisks after the “Ubuntu 12.04” heading in the downloads section when I started.

Anyway, I am trying the .run method. Still having problems.

I exited the GUI. (The procedure for this is not given in the Getting Started Guide, but it is: In Terminal type “sudo /etc/init.d/lightdm stop”, password, then press “Ctrl” “Alt” and “F1” at the same time, then at the login prompt give your username, return, password, return.)

I typed “sudo apt-get –purge remove nvidia-current”. It confirmed that it was not there to be removed.

I switched to the Downloads dir. (where the .run file is) and typed “sudo sh”. It ran. I stepped through the terms agreement, agreed to it, and indicated yes to install each thing and accepted the default locations. Still I got:
Driver: Installation Failed
Toolkit: Installation skipped
Samples: Installation skipped

The Logfiles indicate:
ERROR: Unable to build the NVIDIA kernel module.
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.

I don’t know what to do from here.

You need to install the appropriate kernel header files. On RHEL that would normally be:

sudo yum install kernel-devel

See if you can figure out what the corresponding command would be using apt on ubuntu.

I think the ubuntu-equivalent installation is

sudo apt-get install linux-headers-$(uname -r)

But it doesn’t fix the error for me.

I tried “sudo apt-get install linux-headers-$(uname -r)”, but got the response:

linux headers-3.11.0-18-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not updated.

Proceeding on from there just gave the same response:

Driver: Installation Failed
Toolkit: Installation skipped
Samples: Installation skipped

I guess that’s what Paleozogt meant by “But it doesn’t fix the error for me.”

I had posted these instructions in another thread and forgot about it… seems others were able to make it work just fine with them. Basically, install the latest drivers from Ubuntu’s xorg-edgers repository and de-select installing the one from the CUDA run file: