cuda 9.1 install fail with ubuntu 16.04 kernel version 4.13.0-26
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.
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.

#1
Posted 01/11/2018 04:03 AM   
I witnessed the same behavior. I even tried following option: [code]--kernel-source-path=/usr/src/linux-headers-4.13.0-26-generic/[/code] but with no result. Output of [code]$uname -r[/code] 4.13.0-26-generic The same problem occurred when I tried installing CUDA 8.0.61 with driver version 375.26. Any idea?
I witnessed the same behavior.

I even tried following option:
--kernel-source-path=/usr/src/linux-headers-4.13.0-26-generic/

but with no result.

Output of
$uname -r
4.13.0-26-generic

The same problem occurred when I tried installing CUDA 8.0.61 with driver version 375.26.

Any idea?

#2
Posted 01/15/2018 05:50 PM   
Probably a temporary solution for me was to downgrade the kernel which comes with a current fresh installation of Ubuntu 16.04 (you can check with uname -r): [code] sudo apt-get purge linux-image-4.13.0-26-generic sudo apt-get purge linux-headers-4.13.0-26-generic [/code] Update initramfs image: [code]sudo update-initramfs -u[/code] Reboot and try again.
Probably a temporary solution for me was to downgrade the kernel which comes with a current fresh installation of Ubuntu 16.04 (you can check with uname -r):
sudo apt-get purge linux-image-4.13.0-26-generic
sudo apt-get purge linux-headers-4.13.0-26-generic


Update initramfs image:
sudo update-initramfs -u


Reboot and try again.

#3
Posted 01/15/2018 06:19 PM   
Yes, I just found that out as well. Actually the docs say that only 4.4 kernel is accepted currently for Ubuntu 16.04. Basically no LTS support at the moment.
Yes, I just found that out as well. Actually the docs say that only 4.4 kernel is accepted currently for Ubuntu 16.04. Basically no LTS support at the moment.

#4
Posted 01/23/2018 07:58 PM   
[quote=""]Probably a temporary solution for me was to downgrade the kernel which comes with a current fresh installation of Ubuntu 16.04 (you can check with uname -r): [code] sudo apt-get purge linux-image-4.13.0-26-generic sudo apt-get purge linux-headers-4.13.0-26-generic [/code] Update initramfs image: [code]sudo update-initramfs -u[/code] Reboot and try again. [/quote] Thank you very much for this, it helped me solve the issue.
said:Probably a temporary solution for me was to downgrade the kernel which comes with a current fresh installation of Ubuntu 16.04 (you can check with uname -r):
sudo apt-get purge linux-image-4.13.0-26-generic
sudo apt-get purge linux-headers-4.13.0-26-generic


Update initramfs image:
sudo update-initramfs -u


Reboot and try again.




Thank you very much for this, it helped me solve the issue.

#5
Posted 03/10/2018 10:40 PM   
Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :(
Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :(

#6
Posted 04/18/2018 03:04 AM   
[quote=""]Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :( [/quote] Hi natdp94, It is very simple, if you follow [b]stuhlo[/b]'s suggestions. First, you have to use the [b]uname[/b] command to find out your kernel version: [code]uname -r[/code] You will get an output similar to the one provided by [b]stuhlo[/b], such as "4.13.0-26-generic". With that exact version, you do the following (e.g., assuming that you got that one): [code] sudo apt-get purge linux-image-4.13.0-26-generic sudo apt-get purge linux-headers-4.13.0-26-generic [/code] Do not forget to replace "4.13.0-26-generic" with the output from [b]uname[/b]. Then, after those two commands have finished, do the following: [code]sudo update-initramfs -u[/code] And that is it. I rebooted, tried again and it worked. I hope it helps!
said:Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :(


Hi natdp94,

It is very simple, if you follow stuhlo's suggestions. First, you have to use the uname command to find out your kernel version:

uname -r


You will get an output similar to the one provided by stuhlo, such as "4.13.0-26-generic". With that exact version, you do the following (e.g., assuming that you got that one):

sudo apt-get purge linux-image-4.13.0-26-generic
sudo apt-get purge linux-headers-4.13.0-26-generic


Do not forget to replace "4.13.0-26-generic" with the output from uname. Then, after those two commands have finished, do the following:

sudo update-initramfs -u


And that is it. I rebooted, tried again and it worked.

I hope it helps!

#7
Posted 04/18/2018 10:23 AM   
[quote=""][quote=""]Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :( [/quote] Hi natdp94, It is very simple, if you follow [b]stuhlo[/b]'s suggestions. First, you have to use the [b]uname[/b] command to find out your kernel version: [code]uname -r[/code] You will get an output similar to the one provided by [b]stuhlo[/b], such as "4.13.0-26-generic". With that exact version, you do the following (e.g., assuming that you got that one): [code] sudo apt-get purge linux-image-4.13.0-26-generic sudo apt-get purge linux-headers-4.13.0-26-generic [/code] Do not forget to replace "4.13.0-26-generic" with the output from [b]uname[/b]. Then, after those two commands have finished, do the following: [code]sudo update-initramfs -u[/code] And that is it. I rebooted, tried again and it worked. I hope it helps! [/quote] Hi, my pc stopped booting after applying these instructions. I have reinstalled Ubuntu after that and tried again to if I did a mistake or not but no luck. Again it is not booting after the second fresh-trial. But I have to add that I have blacklisted nouveau kernel driver after a failed attempt of NVIDIA Installation for stopping it. Maybe I can not use these instructions alongside with a blacklisted nouveau? Update : Turns out I just purged too much. Corrected my mistake; now I have only 4.4.0-121. But the problem persists. I still have the error as "The driver installation is unable to locate the kernel source. Please make sure hat 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" Ubuntu 16.04 & cuda_9.0.176_384.81_linux-run
said:
said:Hello! I've been getting the same error with cuda 8.0, but I cannot find a way to fix it, could you tell me how it worked for you? :(


Hi natdp94,

It is very simple, if you follow stuhlo's suggestions. First, you have to use the uname command to find out your kernel version:

uname -r


You will get an output similar to the one provided by stuhlo, such as "4.13.0-26-generic". With that exact version, you do the following (e.g., assuming that you got that one):

sudo apt-get purge linux-image-4.13.0-26-generic
sudo apt-get purge linux-headers-4.13.0-26-generic


Do not forget to replace "4.13.0-26-generic" with the output from uname. Then, after those two commands have finished, do the following:

sudo update-initramfs -u


And that is it. I rebooted, tried again and it worked.

I hope it helps!


Hi, my pc stopped booting after applying these instructions. I have reinstalled Ubuntu after that and tried again to if I did a mistake or not but no luck.

Again it is not booting after the second fresh-trial. But I have to add that I have blacklisted nouveau kernel driver after a failed attempt of NVIDIA Installation for stopping it. Maybe I can not use these instructions alongside with a blacklisted nouveau?

Update :

Turns out I just purged too much. Corrected my mistake; now I have only 4.4.0-121.
But the problem persists. I still have the error as

"The driver installation is unable to locate the kernel source. Please make sure hat 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"

Ubuntu 16.04 & cuda_9.0.176_384.81_linux-run

#8
Posted 04/24/2018 11:30 PM   
Scroll To Top

Add Reply