Installing nvidia drivers for rtx 2070 on centos 7

Hi there,

I’ve been trying to install without success the official Nvidia drivers on a fresh install of centos. I looked around the web and followed the installation guides but I can’t get it to work:

  • I downloaded the drivers from the Nvidia website
  • updated yum and installed prerequisites:
  • yum groupinstall “Development Tools”
  • yum install kernel-devel epel-release
  • yum install dkms
  • Disabled Nouveau
  • rebooted, then ran installer under sudo in text mode. It fails. I try first with dkms, then without. It asks if I want 32 bit compatibility and I say yes as advised. In both cases I get an message about libglvnd being incomplete. I try both options: “continue without installing libglvnd files” and “install and overwrite existing files”. Doesn’t make a difference.

In all cases the problem seems to be in finding the kernel headers to build the module:

With dkms I get:

ERROR: Failed to run '/usr/sbin/dkms -m nvidia -v 418.74 -k 3.10.0-957.el7.x86_64': Error! echo
Your kernel headers for kernel 3.10.0-957.el7.x86_64 cannot be found at
/lib/modules/3.10.0-957.el7.x86_64/build or /lib/modules/3.10.0-957.el7.x86_64/source.

without dkms I get:

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.

I already installed kernel-devel, so this shouldn’t happen. So I tried to install ‘kernel-source’ but it’s not available in yum. So looking online, I found this guide to get the kernel source ( I followed the painful process and got the RPM built.

So I then re-run with the kernel-source-path flag without dkms, and now I get this error:

ERROR: Neither the '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64/include/linux/version.h' nor the '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64/include/generated/uapi/linux/version.h' kernel header file exists. The most likely reason for this is that the kernel source files in '/home/ahmadofski/rpmbuild/BUILD/kernel-3.10.0-957.12.1.el7/linux-3.10.0-957.12.1.el7.x86_64' have not been configured. 

Sure enough version.h is missing from the …/include/linux directory.
So what do I do now? Do I have to rebuild the kernel RPM? is there some other packages I need to install? Help!

OS: 3.10.0-957.12.1.el7.x86_64 GNU/Linux
Driver: 418.74
Card: TU106 [GeForce RTX 2070 rev. A]

Why not using ?

It looks like your kernel-devel package doesn’t match your running kernel. No idea how it happened.

Could you show the output of “rpm -qa | sort | grep kernel” and “uname -a”?

Also, if you don’t have 32bit applications installed, there’s no need to install 32bit libraries.