EDIT: One note I forgot to add is that I"m using Vmware to run ubuntu. I'm assuming that may be causing the problem?
New to Ubuntu (and Linux) and I'm having trouble installing Cuda 9.0.
During installation via the command sudo sh cuda_9.0.176_384.81_linux.run I'm getting this error:
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
First I was getting X server is still running error and by following the steps below, that error is replaced with the above error.
These are the steps I took to get rid of the X server is still running error
- Hit CTRL+ALT+F1 and login using your credentials.
- kill your current X server session by typing
sudo service lightdm stoporsudo stop lightdm - Enter runlevel 3 (or 5) by typing
sudo init 3(orsudo init 5) and install your.runfile.
However, during step 3, when I try to install the file, I get unable to locate kernel source error.
The file that I'm trying to run is cuda_0.0.176_384.81_linux.run which is in my home folder.
During installation: I hit yes for everything (drivers, CUDA toolkit, CUDA samples) etc.
In the end I get a summary that looks something like this:
Driver: Installation failed
XXXX : Installation skipped
XXXX: Installation skipped
How can I fix this installation error?
$ uname -r
4.10.0-37-generic
$ dpkg-query -l linux-headers-\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
un linux-headers- <none> <none> (no description available)
ii linux-headers- 4.10.0-28.32 all Header files related to Linux ker
ii linux-headers- 4.10.0-28.32 amd64 Linux kernel headers for version
ii linux-headers- 4.10.0-37.41 all Header files related to Linux ker
ii linux-headers- 4.10.0-37.41 amd64 Linux kernel headers for version
ii linux-headers- 4.10.0.37.39 amd64 Generic Linux kernel headers
EDIT: My question is different from the possible duplicate question because the other question doesn't have any references to the error I'm getting:
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
I've already tried the marked solution from this thread.