Das Problem
Das Ausführen des Befehls „dnf update“ schlägt mit folgendem Fehler fehl:
# 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)
Der Versuch, die oben gemeldeten Pakete einzeln zu aktualisieren, führt ebenfalls zu einem ähnlichen Fehler.
# 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)
Das Löschen des dnf-Cache „dnf clean all“ hat keinen Unterschied gemacht.
# dnf clean all
Die Lösung
In diesem Fall verursacht das Paket perl-interpreter und perl-libs ein Problem. Dies könnte auf ein Metadatenproblem bei diesen Paketen zurückzuführen sein. Führen Sie die folgenden Befehle aus, um das Problem zu umgehen.
1. Führen Sie den folgenden Befehl aus und prüfen Sie, ob die Aktualisierung fortgesetzt wird. Wenn es immer noch nicht aktualisiert wird, hilft uns dies bei der Identifizierung des Pakets, das nicht mit der Option „–best –allowerasing“ entfernt werden kann. In diesem Fall ist es das perl-libs-Paket, das die Aktualisierung immer noch blockiert.
# 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. Führen Sie das Update für das Paket aus der Befehlsausgabe von Schritt 1 aus. In diesem Fall ist es perl-libs.
# dnf update perl-libs.x86_64 --best --allowerasing
3. Versuchen Sie dann ein normales Update:
# dnf update