• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“cannot install the best update candidate for package” – error on running dnf update

by admin

The Problem

Running the ‘dnf update’ command fails with below error:

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

Attempt to update the above reported packages individually also results in similar error.

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

Clearing the dnf cache “dnf clean all” did not make any difference.

# dnf clean all

The Solution

In this case, perl-interpreter and perl-libs package is causing an issue. This could be due to some metadata issue with these packages. Run the following commands to workaround the issue.

1. Run the following command and see if the update proceeds. If it still doesn’t update, this helps us with identifying the package that is not able to remove with ‘–best –allowerasing’ option. In this case, it is perl-libs package that is still blocking the update.

# 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. Run the update for the package from step 1 command output. In this case it is perl-libs.

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

3. Then attempt normal update:

# dnf update

Filed Under: CentOS/RHEL, CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. keyctl: command not found
  2. LVM ISCSI Physical Volume Not Available After Server Reboot
  3. xxd command – Expressed in hexadecimal form
  4. cryptcat: command not found
  5. virsh Command Examples in Linux
  6. mknod Command Examples in Linux
  7. CentOS / RHEL : How to setup session idle timeout (inactivity timeout) for ssh auto logout
  8. chattr: command not found
  9. pacstrap Command Examples in Linux
  10. bc: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright