CentOS 7上安装NVIDIA显卡驱动:轻松掌握
admin2023-10-26【电脑应用】浏览:184
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)
相关文章
- 立象打印机怎么样 立象打印机怎么用
- 罗技驱动win7能用吗 罗技鼠标支持win7系统吗
- Win10:轻松设置开机自动启动程序指南
- 冷门视频格式解码,哪个播放器助你一臂之力
- potplayer怎么倍速播放 potplayer倍速播放卡顿
- word设置表格样式教程 word设置表格样式教程图
- Word如何删除分页符 Word文档取消分页符方法 word文档中如何取消分页符
- 显示器坏点检测方法 显示器如何检测坏点
- 宽带速率对照表1001宽带速率对照表 宽带速率达标标准
- 揭秘军用级三防加固笔记本电脑:强悍防护,科技与军事的完美结合
- windows hello闪退解决方法 windows hello人脸闪退
热评文章
企业微信分屏老师能看到吗 企业微信切屏老师能看见吗
excel如何批量输入求和公式 excel批量输入求
罗技驱动win7能用吗 罗技鼠标支持win7系统吗
打印机驱动卸载干净教程 打印机驱动怎样卸载干净
显卡驱动更新小技巧,让你的电脑运行更稳定
手机系统声音不起眼,但很重要 手机系统声音有的,但