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.
当报这样的错时 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.
或者降级kernel
降级的版本为4.4.0-21-generic
$ sudo apt-get install linux-image-4.4.0-21-generic
查看是否安装好
修改内核
$ sudo vim /etc/default/grub
将原先的 GRUB_DEFAULT=0
修改为
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-21-generic"
更新grub 引导(这里一定要更新)
$ sudo update-grub
重启,查看现在使用的内核版本
uname -r