I’ve updated several machines to F37 without problem but I have one machine that I get the following error.
# dnf system-upgrade download --releasever=37
.....
Error:
Problem: The operation would result in removing the following protected packages: grub2-efi-ia32, grub2-efi-x64, grub2-pc, shim-ia32, shim-x64, sudo
Does anyone know how to correct this problem so I can upgrade? (obviously removing sudo would be bad
I got yesterday an error about grub2. sudo dnf upgrade --refresh renewed the cache an made an update/fix of grub2. You might just check this too first.
or
If some of your packages have unsatisfied dependencies, the upgrade will refuse to continue until you run it again with an extra --allowerasing option. This often happens with packages installed from third-party repositories for which an updated repository hasn’t been yet published. Study the output very carefully and examine which packages are going to be removed. None of them should be essential for system functionality, but some of them might be important for your productivity.
In case of unsatisfied dependencies, you can sometimes see more details if you add --best option to the command line.
If you want to remove/install some packages manually before running dnf system-upgrade download again, it is advisable to perform those operations with --setopt=keepcache=1 dnf command line option. Otherwise the whole package cache will be removed after your operation, and you will need to download all the packages once again.
sudo dnf repolist remove what is coper etc. and install after update again.
Have you tried the always recommended step of dnf upgrade --refresh and possibly dnf distro-sync. Those commands often fix this type of error. If they cannot complete without error then the errors need resolved before doing the version upgrade.
Also the suggestion to disable or remove 3rd party repos is good when doing a major version update, though that need is often seen as a conflict rather than an error of the type you show.
Try doing a reinstall of all the packages noted. That should get them in sync with the repos. Once they are in sync then a system upgrade should be able to manage it properly since they are not being removed, merely upgraded to the new release.
You might also consider using the options --allowerasing, --best, or --skip-broken individually or in some combination to find out what the results are. Sometimes that may fix it.
No rebuilding the data base didn’t work and I’d already reinstalled all those packages.
If I comment out the lines in /etc/dnf/protected.d files I get …
Error:
Problem 1: problem with installed package shim-ia32-15.6-2.x86_64
- package shim-ia32-15.6-2.x86_64 requires grub2-efi-ia32 >= 2.06~rc1, but none of the providers can be installed
- conflicting requests
Problem 2: problem with installed package shim-x64-15.6-2.x86_64
- package shim-x64-15.6-2.x86_64 requires grub2-efi-x64 >= 2.06~rc1, but none of the providers can be installed
- conflicting requests
# rpm -qa |grep grub2-efi-x64
grub2-efi-x64-2.06-62.fc36.x86_64
grub2-efi-x64-cdboot-2.06-62.fc36.x86_64
this makes no sense … I’m not sure why it thinks it needs a higher version of grub2 than is availabl
I removed all the UEFI packages (because I’m BIOS booting).
I commented the relevant lines in files from /etc/dnf/protected.d to see what might be happening and now see…
Error:
Problem: problem with installed package grub2-pc-1:2.06-62.fc36.x86_64
- package grub2-pc-1:2.06-89.fc37.x86_64 requires grub2-tools = 1:2.06-89.fc37, but none of the providers can be installed
- package grub2-pc-1:2.06-58.fc37.x86_64 requires grub2-tools = 1:2.06-58.fc37, but none of the providers can be installed
- grub2-pc-1:2.06-62.fc36.x86_64 does not belong to a distupgrade repository
- conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)
Why would it be trying to install two versions of grub-pc ??
Well I found a solution to the issue…
I removed the 32 bit efi files (I’m booting 64 bit, so I don’t know why these were ever installed) and marked the problem packages as ‘user installed’. # dnf mark install grub2-pc grub2-efi-x64 shim-x64
After doing this the update proceeded without problems.