Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install a NVidia Cuda driver on a Amazon EC2. GPU instance (Amazon Linux AMI (HVM) 2013.09.2 - ami-e9a18d80) following the instructions laid out in a blog. It worked for the last two weeks, but today it fails.

The instructions state

sudo yum -y groupinstall "Development Tools"
sudo yum -y install git libcurl-devel python-devel screen rsync yasm numpy openssl-devel
wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run
sudo sh cuda_5.5.22_linux_64.run

error is

Installing the NVIDIA display driver... The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly. If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.

There is a comment on the instructional on how to possibly fix but I do not understand the commands, I cant seem to navigate to the paths specified. If someone could explain it like I am 5 for me I think it would be helpful.

For people having trouble with installing CUDA (fails with some complaint about the kernel source), 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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You simply need to snatch your kernel-source tree (and make sure the build is identical to your bootable kernel.)

So, yum -y install kernel-devel kernel-headers

uname -r will also tell you the specific kernel build, important to make sure it matches the devel packages!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.