install Nvidia drivers in CentOS 7

本文介绍了一种在未提供NVIDIA驱动程序的系统上手动安装该驱动的方法。首先需要从NVIDIA官网下载相应的驱动文件,然后更新系统并安装必要的构建工具。接着手动编译驱动程序并完成安装,最后验证显卡驱动是否正确安装。

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

How are we going to do that?

After you setup the extra repositories, you will discover that the Nvidia drivers may not yet be available. And that you have the Nouveau open-source driver running instead. Sort of. So we will have to do a bit of hard work purging the existing driver, then installing the proprietary blob. And because we don't have the driver in the repos, we will manually compile the whole thing.

Step 1: Download the driver

Head to Nvidia site and download the driver. Very simple.

Step 2: Update your system & build tools

Like we did with CentOS 6, it is important to fully update your system before proceeding with the driver installation. The reason for this is that your running kernel may be older than the kernel source available in the repositories, so this will cause compilation conflicts. Therefore, first max. update the system:

yum update

Reboot if necessary for your latest kernel to load. Then, install kernel source, kernel headers, make and gcc, just like in the good old times!

yum install kernel-devel kernel-headers gcc make

Compare your running kernel with the installed source:

uname -r
rpm -q kernel-devel

If the two do not match, upgrade and reboot until they do:

yum -y upgrade kernel kernel-devel

chmod +x NVIDIA-XXX.run

sudo ./NVIDIA*.run -no-x-check -no-nouveau-check -no-opengl-files

Verify the successful installation of the video card

nvidia-smi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值