Installing Cuda Drivers on Amazons EC2

Hello Everyone,
Im on EC2 trying to get cuda setup. Im on a GPU instance with ubuntu server.
While trying to install the cuda driver it runs into trouble getting the kernel source.

I cloned the src with: git clone git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git source

But when i then run the dev driver with: sh devdriver_3.2_linux_64_260.19.26.run --kernel-source-path=/home/ubuntu/source
I get the following error:

ERROR: The kernel header file ‘/home/ubuntu/src/include/linux/version.h’ does not exist. The most
likely reason for this is that the kernel source files in ‘/home/ubuntu/src’ have not been
configured.

I tried poking around in the src direcotry, but i cannot find a version.h that will work

Im most likely approaching this wrong…

Any ideas and pointer welcome.

So i found another possible location for the src: /usr/src/linux-headers-2.6.32-312-ec2
which is the kernel version I am running.

Though with that location i get this:

ERROR: If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

     If you are using a Linux 2.6 kernel, please make sure
     you have configured kernel sources matching your kernel
     installed on your system. If you specified a separate
     output directory using either the "KBUILD_OUTPUT" or
     the "O" KBUILD parameter, make sure to specify this
     directory with the SYSOUT environment variable or with
     the equivalent nvidia-installer command line option.

     Depending on where and how the kernel sources (or the
     kernel headers) were installed, you may need to specify
     their location with the SYSSRC environment variable or
     the equivalent nvidia-installer command line option.

I also have SYSSRC set to /usr/src/linux-headers-2.6.32-312-ec2

You only need to install the kernel-headers package for the kernel you are running. That will include the correct header and config files for the running kernel. The NVIDIA installer should just work after that.

I installed the kernel headers but it doesnt work, i got them with

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

Here is the log, it certainly picks out the right headers dir in /usr/src but something is still not working

I just found myself in exactly the same situation as the OP. Has anyone made any progress on this front?

I just found myself in exactly the same situation as the OP. Has anyone made any progress on this front?

Me too. I’ve tried installing drivers for each of CUDA 3.2 and 4.0 with the same effect.

SElinux isn’t the problem, as it all to often is with installs of other software.

Paul

execute the script with the update parameter:

sh devdriver_3.2_linux_64_260.19.26.run --update

that will download the last available version.

It worked for me

I followed also these steps:

http://www.r-tutor.com/gpu-computing/cuda-installation/cuda4.0-ubuntu

Posting here even though the post is years old, in case someone comes here from Google like I did looking for a solution.

Here’s the fix I found… The kernel source in /usr/src/kernels wasn’t the same version as the kernel I was running (which you can find with uname -r). I went into /boot/grub/menu.lst and made sure that the only enabled kernel version was the one I had the source for.

Worked like a charm.