I have installed CUDA Toolkit, which comes with its own Nvidia drivers etc. However, since the Nvidia drivers and tools from rpmfusion-nonfree-updates are slightly newer, Fedora tries to install those instead, which fails due to conflicts.
How can I prevent Fedora from trying to overwrite packages from the cuda-fedora42 repo with similar packages from rpmfusion-nonfree-updates? I would prefer not having to lock the package version, as I want updates when available in the cuda repo. I would also prefer to not remove rpmfusion-nonfree-updates entirely, since I get Discord and some other packages from there too.
My google-fu says that you should open up the repository file /etc/yum.repos.d/rpmfusion-nonfree.repo with your favourite text editor and add an exclude=nvidia* in the [rpmfusion-nonfree] section. But that seem to be older info and also relate to yum.
The official dnf command ref has an excludepkgs flag instead
https://dnf.readthedocs.io/en/latest/conf_ref.html#options-for-both-main-and-repoI haven’t tried it myself.
It seems like I didn’t have to use the drivers from cuda-fedora42 in order to use the CUDA Toolkit, but I’ll save this in case I get package conflicts in the other direction in the future. Thanks!
They’re essentially the same, and honestly, you probably want the rpmfusion ones available anyway as you’ll get more frequent updates if you’re doing things like gaming.
It seems like you may have chosen the wrong meta package to install from the Nvidia repo. You want the one called
cuda-toolkit-13, which only installs the Cuda tools, and doesn’t try to manage the drivers.If you’re using this for development purposes, you may have a need to keep the library chain of packages in line because the Nvidia toolchains are very fickle.
Ah, interesting… I’ve been using CUDA Toolkit/SDK since Fedora 39 I think, and I was under the impression that it required its own versions of the drivers. I tried removing all packages from cuda-fedora42, reinstalling the driver from rpmfusion and then just the cuda-toolkit. So far it seems to be working, so let’s hope it continues that way. Thanks!
No prob. To help in the future, think of it like this:
- all the Nvidia libraries will work with any driver after a minimum version
- the Nvidia driver is the core of the ecosystem, where it accepts all work as designed from any library
So the only time you get a mismatch and have a problem is when you have an OLD driver paired with a new library. This is because the library may try to issue a new command that the driver does not yet support.
If you ever run into issues, just search up the Nvidia version support matrix for whichever library is having problems. Here is an example
