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

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、重新启动系统
Using: nvidia-installer ncurses v6 user interface -> Detected 192 CPUs online; setting concurrency level to 32. -> Scanning the initramfs with lsinitramfs... -> Executing: /usr/bin/lsinitramfs -l /boot/initrd.img-5.4.0-100-generic -> Initramfs scan complete. -> Multiple kernel module types are available for this system. Which would you like to use? (Answer: MIT/GPL) WARNING: An NVIDIA kernel module 'nvidia-uvm' appears to be already loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading. Some of the sanity checks that nvidia-installer performs to detect potential installation problems are not possible while an NVIDIA kernel module is running. -> Would you like to continue installation and skip the sanity checks? If not, please abort the installation, then close any programs which may be using the NVIDIA GPU(s), and attempt installation again. (Answer: Continue installation) WARNING: Continuing installation despite the presence of a loaded NVIDIA kernel module. Some sanity checks will not be performed. It is strongly recommended that you reboot your computer after installation is complete. If the installation is not successful after rebooting the computer, you can run `nvidia-uninstall` to attempt to remove the NVIDIA driver. -> Kernel module load tests will be skipped. -> Installing NVIDIA driver version 570.133.07. -> Performing CC sanity check with CC="/usr/bin/cc". -> Performing CC check. 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 systems, for example, 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 w
03-26
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值