GNU/Linux >> Belajar Linux >  >> Cent OS

“tidak dapat menginstal kandidat pembaruan terbaik untuk paket” – kesalahan saat menjalankan pembaruan dnf

Masalahnya

Menjalankan perintah 'dnf update' gagal dengan kesalahan di bawah ini:

# 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)

Mencoba memperbarui paket yang dilaporkan di atas satu per satu juga menghasilkan kesalahan serupa.

# 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) 

Menghapus cache dnf “dnf clean all” tidak ada bedanya.

# dnf clean all

Solusinya

Dalam hal ini, paket perl-interpreter dan perl-libs menyebabkan masalah. Ini mungkin karena beberapa masalah metadata dengan paket-paket ini. Jalankan perintah berikut untuk mengatasi masalah tersebut.

1. Jalankan perintah berikut dan lihat apakah pembaruan berlanjut. Jika masih tidak diperbarui, ini membantu kami mengidentifikasi paket yang tidak dapat dihapus dengan opsi ‘–best –allowering’. Dalam hal ini, paket perl-libs yang masih memblokir pembaruan.

# 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. Jalankan pembaruan untuk paket dari output perintah langkah 1. Dalam hal ini adalah perl-libs.

# dnf update perl-libs.x86_64 --best --allowerasing

3. Kemudian coba perbarui normal:

# dnf update


Cent OS
  1. Panduan pemasangan server khusus Left 4 Dead untuk CentOS

  2. Kesalahan Menjalankan Sudo Apt-get -f Instal?

  3. E:Paket Perlu Diinstal Ulang, Tapi Saya Tidak Dapat Menemukan Arsip Untuk Itu?

  1. Manajemen Paket CentOS 8 dengan DNF di Baris Perintah

  2. PPM Install Error:tidak ditemukan target instalasi yang sesuai untuk paket

  3. Tidak dapat menemukan kesalahan pkg-config

  1. Instal ekstensi MySQLnd untuk PHP 7.2.3 di PPC64LE dengan CentOS 7

  2. Centos – Pembaruan Yum Gagal:Kesalahan:Tidak Dapat Mengambil Metadata Repositori (repomd.xml) Untuk Repositori …?

  3. “Id buruk untuk repo:Repo Saya, byte =2” kesalahan pembaruan yum