2

This question is not a duplicate of the question correct kernel source path There the problem was solved be installing the kernel header files. In my case the kernel header files are already installed.

Before you flag as duplicate: I believe I have read all sources to this topic and still the NVIDIA kernel module build fails with 'unable to locate kernel source'.

Ubuntu 14.04, trying to install cuda_7.5.18_linux.run (md5sum: 4b3bcecf0dfc35928a0898793cf3e4c6)

~# uname -r
3.19.0-39-generic

~# ll /usr/src/
total 28
drwxr-xr-x  7 root root 4096 Dec 10 15:12 ./
drwxr-xr-x 10 root root 4096 Aug  5 01:12 ../
drwxr-xr-x 24 root root 4096 Dec  4 12:13 linux-headers-3.19.0-37/
drwxr-xr-x  7 root root 4096 Dec  4 12:13 linux-headers-3.19.0-37-generic/
drwxr-xr-x 24 root root 4096 Dec  7 09:45 linux-headers-3.19.0-39/
drwxr-xr-x  7 root root 4096 Dec  7 09:45 linux-headers-3.19.0-39-generic/
drwxr-xr-x  4 root root 4096 Dec 10 14:55 linux-source-3.13.0/
lrwxrwxrwx  1 root root   47 Nov 30 23:38 linux-source-3.13.0.tar.bz2 -> linux-source-3.13.0/linux-source-3.13.0.tar.bz2

When started with

~# sh cuda_7.5.18_linux.run

or

~# sh cuda_7.5.18_linux.run --linux-kernel-path /usr/src/linux-headers-3.19.0-39-generic/

installation fails with the same error: Unable to locate kernel sources...

ritter
  • 353

1 Answers1

1

First run:

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb

Then:

sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo apt-get update
sudo apt-get install cuda -y

After that, it should work.

Alex Lowe
  • 471