linux里面编译安装显卡驱动失败:ERROR:Unable to find the kernel source tree for the currently running kernel.

云联
2023-12-01
ERROR:Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured on Red Hat Linux system, for exzmple ,be sure you have the 'kernel-source' or 'kernel-devel' RPM installed .If you know the correct kernel source files are installed ,you may specify the kernel source path with the '--kernel-source-path' command line option.
根据错误提示,缺少kernel,解决方案:下载与你系统对应的kernel
1、使用命令,查看你使用的是:
uname -r
我的是4.13
2、从 Ubuntu 官方内核库中下载 Linux Kernel 4.13
64 位 Ubuntu 系统:
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb
3、下载完成后使用如下命令安装 Linux Kernel 4.13:
sudo dpkg -i *.deb
4、使用如下命令更新 Grub 引导加载程序:
sudo update-grub
如果使用 BURG 引导加载程序,请运行:
sudo update-burg
5、重新启动系统
 类似资料: