linux服务器搭建之路16-在最新内核上安装nvidia显卡驱动

前面升级了内核,并更新了响应的工具包。但在新内核上安装nvidia显卡的时候会遇到问题,主要是:内核找不到,需要指定内核版本,错误代码:
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 htey are properly configured; on red hat linux system, 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 with the ‘–kernel-source-path’ command line option.

解决办法:指定内核路径: 在/usr/src/kernels/文件夹下的内核版本,我的是4.19

在安装命令后面加上–kernel-source-path 参数:

bash NVIDIA-Linux-x86_64-410.78.run --kernel-source-path='/usr/src/kernels/4.19.10-1.el7.elrepo.x86_64'

参考文章:升级内核:https://blog.csdn.net/jinxiaonian11/article/details/82928250
安装驱动:https://blog.csdn.net/u013378306/article/details/69229919

你可能感兴趣的:(Linux使用指南)