Le problème
L'exécution de la commande "dnf update" échoue avec l'erreur ci-dessous :
# dnf update Error: Problem 1: package perl-4:5.26.3-419.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed - cannot install both perl-interpreter-4:5.26.3-419.el8_4.1.x86_64 and perl-interpreter-4:5.26.3-419.el8.x86_64 - cannot install the best update candidate for package perl-interpreter-4:5.26.3-419.el8.x86_64 - cannot install the best update candidate for package perl-4:5.26.3-419.el8.x86_64 Problem 2: package perl-devel-4:5.26.3-419.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed - cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64 - cannot install the best update candidate for package perl-libs-4:5.26.3-419.el8.x86_64 - cannot install the best update candidate for package perl-devel-4:5.26.3-419.el8.x86_64 Problem 3: perl-libs-4:5.26.3-419.el8.i686 has inferior architecture - package perl-utils-5.26.3-419.el8.noarch requires perl-libs = 4:5.26.3-419.el8, but none of the providers can be installed - cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64 - package perl-Errno-1.28-419.el8_4.1.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8_4.1, but none of the providers can be installed - cannot install the best update candidate for package perl-utils-5.26.3-419.el8.noarch - cannot install the best update candidate for package perl-Errno-1.28-419.el8.x86_64 (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)
Tenter de mettre à jour les packages signalés ci-dessus individuellement entraîne également une erreur similaire.
# dnf update perl-interpreter Error: Problem: problem with installed package perl-4:5.26.3-419.el8.x86_64 - package perl-4:5.26.3-419.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed - cannot install both perl-interpreter-4:5.26.3-419.el8_4.1.x86_64 and perl-interpreter-4:5.26.3-419.el8.x86_64 - cannot install the best update candidate for package perl-interpreter-4:5.26.3-419.el8.x86_64 (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)
Effacer le cache dnf "dnf clean all" n'a fait aucune différence.
# dnf clean all
La solution
Dans ce cas, les packages perl-interpreter et perl-libs posent problème. Cela peut être dû à un problème de métadonnées avec ces packages. Exécutez les commandes suivantes pour contourner le problème.
1. Exécutez la commande suivante et voyez si la mise à jour se poursuit. S'il ne se met toujours pas à jour, cela nous aide à identifier le paquet qui ne peut pas être supprimé avec l'option "-best -allowerasing". Dans ce cas, c'est le paquet perl-libs qui bloque toujours la mise à jour.
# dnf update --best --allowerasing Error: Problem: cannot install the best update candidate for package perl-4:5.26.3-419.el8.x86_64 - problem with installed package perl-4:5.26.3-419.el8.x86_64 - package perl-4:5.26.3-419.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-419.el8, but none of the providers can be installed - cannot install the best update candidate for package perl-libs-4:5.26.3-419.el8.x86_64 - cannot install both perl-libs-4:5.26.3-419.el8_4.1.x86_64 and perl-libs-4:5.26.3-419.el8.x86_64 (try to add '--skip-broken' to skip uninstallable packages)
2. Exécutez la mise à jour du package à partir de la sortie de la commande de l'étape 1. Dans ce cas, il s'agit de perl-libs.
# dnf update perl-libs.x86_64 --best --allowerasing
3. Tentez ensuite une mise à jour normale :
# dnf update