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

本文解决在升级内核后安装NVIDIA显卡驱动遇到的问题,主要错误为内核源树未找到。通过指定正确的内核路径,成功在新内核下安装驱动。文章提供详细的解决步骤及命令行参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前面升级了内核,并更新了响应的工具包。但在新内核上安装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.youkuaiyun.com/jinxiaonian11/article/details/82928250
安装驱动:https://blog.youkuaiyun.com/u013378306/article/details/69229919

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值