Nvidia-driver-branch-470 and kmod-nvidia-latest-dkms

In CentOS 7.9, when attempting to use the 470 stable branch instead of the latest along with the cuda-11-0 metapackage, kmod-nvidia-latest-dkms gets deployed and causes yum update to fail since it wants to upgrade from the stack deployed by nvidia-driver-branch-470. Clearly we can work around this by using yum update --exclude=kmod-nvidia-latest-dkms each time, but it would be logical for nvidia-driver-branch-470 to satisfy any dependency on kmod-nvidia-latest. Some of us can’t run the latest driver branch.

A yum remove kmod-nvidia-latest-dkms will cause the following packages to be removed, so likely some dependency issues to work out with the rpm

$ sudo yum update
NVIDIA: No kernel module package kmod-nvidia-latest for kernel-3.10.0-1160.59.1.el7.x86_64 and 3:nvidia-driver-latest-510.47.03-1.el7.x86_64 found. Ignoring the new kernel
Error: nvidia-driver-latest conflicts with 3:nvidia-driver-branch-470-470.103.01-1.el7.x86_64
Error: nvidia-driver-branch-470 conflicts with 3:nvidia-driver-latest-510.47.03-1.el7.x86_64

If you want to take control over the nvidia driver version installed, you should rather use the metapackage cuda-toolkit-11-0 instead of cuda-11-0, which installs nvidia-latest.

Thanks for the tip on that cuda-toolkit-11-0 metapackage.

Consider the other issue, one that does not involve any cuda package…

After purging all cuda related packages and doing a yum install nvidia-driver-branch-470, kmod-nvidia-latest-dkms is automatically deployed. The 470 version of said package is selected correctly, but subsequent yum update will try to pull down the 510 version without version pinning. Perhaps we need a kmod-nvidia-470-dkms?

Either the dependencies of the packages are completely broken or there’s something else installed that will pull in nvidia-latest. Please check reverse dependencies using
rpm -q --requires