CentOS 7上安装NVIDIA显卡驱动:轻松掌握
admin2023-10-26【电脑应用】浏览:234
System Version:CentOS 7.7.1908
kernel Version:3.10.0-1062.el7.x86_64
条件
禁止 Nouveau
安装 kernel-devel 或 kernel-source、kernel-header;
安装 binutils,路径/usr/bin/ld;
1.安装依赖
yum -y install epel-release
yum -y install gcc binutils wget
yum -y install kernel-devel
2.禁用Nouveau
2.1.检查是否开启Nouveau
lsmod | grep nouveau
注意:无信息输出表示已被禁用无需再操作以下步骤;
2.2.修改配置
echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/blacklist.conf
2.3.备份img
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
2.4.重建
dracut /boot/initramfs-$(uname -r).img $(uname -r)
2.5.重启系统
reboot
2.6.检查是否关闭
lsmod | grep nouveau
注意:无任何信息输出表示禁用成功;
3.检查驱动
3.1.安装elrepo源
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
或者
yum -y install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
3.2.安装nvidia-detect
yum -y install nvidia-detect
3.3.检测显卡驱动
nvidia-detect -v
This device requires the current 440.36 NVIDIA driver kmod-nvidia
4.驱动安装
4.1.下载驱动
wget https://us.download.nvidia.cn/XFree86/Linux-x86_64/440.36/NVIDIA-Linux-x86_64-440.36.run
注意:如果检测出来版本号与我的不一致可以自行替换红色部分;
其他版本:
wget https://us.download.nvidia.cn/XFree86/Linux-x86_64/430.40/NVIDIA-Linux-x86_64-430.40.run
wget https://us.download.nvidia.cn/XFree86/Linux-x86_64/430.40/NVIDIA-Linux-x86_64-418.56.run
4.2.授权
chmod +x NVIDIA-Linux-x86_64-440.36.run
4.3.安装
sh ./NVIDIA-Linux-x86_64-440.36.run -s

参数
--module-signing-secret-key=/path/to/signing.key
--module-signing-public-key=/path/to/signing.x509
4.4.查看显卡信息
nvidia-smi

注意:信息输出表示显卡驱动已经安装完成;
5.卸载驱动
5.1.卸载安装
nvidia-uninstall
5.2.清理安装
dkms remove
注意:需要安装“yum -y install dkms”
6.常见错误
1.安装时报错“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 with the '--kernel-source-path' command line option.”
解决办法:
安装内核库
yum -y install epel-release
yum -y install kernel-devel
内核版本对比
rpm -qa |grep kernel
uname -r
安装驱动
./NVIDIA-Linux-x86_64-440.36.run --kernel-source-path=/usr/src/kernels/3.10.0-1160.42.2.el7.x86_64 -k $(uname -r)
相关文章
- potplayer如何删除播放记录 potplayer最近记录怎么关闭
- 水星路由器MW310R上不了网的解决方法 水星mw310r无线路由器能连不能上网怎么设
- 轻松连接电脑与投影仪:一看就会的实用指南
- Excel中如何快速拆分姓名和号码 excel快速拆分姓名和电话
- 迅捷FW300RM迷你路由器无线路由模式设置上网 迅捷fw313r路由器设置
- 电脑版微信截图小技巧:轻松实现截屏操作
- 按键震动怎么关 oppo手机按键震动怎么关
- 手机看图新体验:轻松打开dwg文件,下载必备手机看图软件
- 破解复制限制,免费畅享网页文字
- win10三国志14已停止工作解决方法 三国志10在win10运行不了
- 360手机助手怎么传照片到电脑 360手机助手怎么上传照片

热评文章
企业微信分屏老师能看到吗 企业微信切屏老师能看见吗
excel如何批量输入求和公式 excel批量输入求
罗技驱动win7能用吗 罗技鼠标支持win7系统吗
打印机驱动卸载干净教程 打印机驱动怎样卸载干净
显卡驱动更新小技巧,让你的电脑运行更稳定
手机系统声音不起眼,但很重要 手机系统声音有的,但