I'm trying to install cuda6.5 using the .run file on an amazon aws gpu instance. I'm getting this error. I'm not sure what the kernel source path is. I did install it with apt-get install linux-source and apt-get source linux-image-$(uname -r) Does anyone know how to fix this issue? I tried --kernel-source-path=/usr/src/linux-source-3.13.0 but it didn't work even though the sources are there.

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.

Install the header files:

sudo apt-get install linux-headers-$(uname -r) # or linux-headers-generic.

Since:

$ apt-cache show linux-source-3.13.0
Package: linux-source-3.13.0
...
Description-en: Linux kernel source for version 3.13.0 with Ubuntu patches
...
If you are simply trying to build third-party modules for your kernel,
you do not want this package. Install the appropriate linux-headers
package instead.

I stumbled upon this problem when installing CUDA 7.5 toolkit. If you run the installer with --verbose flag, it will generate the log file with error details. In my case, the actual problem was with kernel source being compiled with newer version of gcc than was installed.

You are supposed to set environmental variable IGNORE_CC_MISMATCH to 1 to circumvent this check, but in my case that did not help, so I have to compile CUDA 7.5 with gcc-5.2 (with --override flag). Have not yet tested if this introduces any calculation errors (as google suggests).

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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