I just installed a fresh Rocky Linux 9.6 minimal system. When I launch dnf update, here’s what I get:
Error:
Problem 1: cannot install the best update candidate for package python-unversioned-command-3.9.21-2.el9.noarch
- nothing provides python3 = 3.9.21-2.el9_6.1 needed by python-unversioned-command-3.9.21-2.el9_6.1.noarch from appstream
Problem 2: package python-unversioned-command-3.9.21-2.el9.noarch from @System requires python3 = 3.9.21-2.el9, but none of the providers can be installed
- cannot install both python3-3.9.21-2.el9_6.2.x86_64 from baseos and python3-3.9.21-2.el9.x86_64 from @System
- problem with installed package python-unversioned-command-3.9.21-2.el9.noarch
- cannot install the best update candidate for package python3-3.9.21-2.el9.x86_64
- nothing provides python3 = 3.9.21-2.el9_6.1 needed by python-unversioned-command-3.9.21-2.el9_6.1.noarch from appstream
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Yep, I agree with @jlehtone this is not a bug. Mirrors that aren’t synced correctly are annoying at best. Whoever maintains them or their lack of maintaining them to ensure they are in sync is despicable. Usually though you can do:
dnf clean all
dnf update
and if you’re lucky, then you’ll get synced with a mirror that is actually up-to-date. About the only time this situation will repeat itself is for example when updates have literally only just been released, and all the other mirrors haven’t fully synced to get the files. In those cases, they’ve synced the repodata, but not the rpm’s themselves. So no matter how much you repeat the commands above it won’t solve it until the mirrors have synced.
There’s already plenty of posts on this forum already with similar output when mirrors are not synced properly, etc. Annoying yes, our fault - no.
If you cannot get synced to a decent mirror, you can change the /etc/yum.repos.d/*.repo files related to Rocky from the mirrorlist to baseurl to force it to use Rocky mirrors. That’s fine for a temporary workaround, but it’s usually best to use mirrorlist to ensure you use your local mirrors for speed and efficiency.
So a few things you can try at least. Either way, it’s not a bug.
Thanks, guys. For the record, that was the initial update on a fresh minimal installation. On this default setup, the next local mirror is picked more or less at random. My post-install configuration usually involves hard-coding the best french mirror (CNRS, Index of /pub/linux/rocky) for DNF.
For the time being, I simply solved the problem by adding the --nobest flag to dnf update.