Unable to upgrade some Perl packages

Hi there,

As I try to update my system to issue command ‘dnf update’, I get the following errors:

Last metadata expiration check: 1:33:49 ago on Saturday, August 14, 2021 AM06:22:04 HKT.
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)
    [root@robin athens]# yum update
    Last metadata expiration check: 1:35:59 ago on Saturday, August 14, 2021 AM06:22:04 HKT.
    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)
    =============================================================================
    I can bypass the above errors by adding optional parameters ‘–allowerasing’, ‘–skip-broken’, and ‘–nobest’ together, can someone tell me what is wrong?

Thanks in advance.
Athens

What do you get with:

dnf list --showduplicates perl-interpreter

Hi jlehtone, thanks for your reply.

After execute your suggested command, I get the following result:

Last metadata expiration check: 0:54:13 ago on Sun 15 Aug 2021 03:55:22 PM HKT.
Installed Packages
perl-interpreter.x86_64 4:5.26.3-419.el8 @baseos
Available Packages
perl-interpreter.x86_64 4:5.26.3-419.el8 baseos
perl-interpreter.x86_64 4:5.26.3-419.el8_4.1 baseos

Any clues for it?
Athens

With dnf module list perl you should see that AppStream has some perl streams too.
With sudo dnf list perl* you should see whether packages are from baseos or appstream and which packages have newer versions available.

Frankly, all these “modules” or “streams” scare me a bit.

1 Like

Hi jlehtone,

I try ‘dnf update’ and now it can upgrade all my Perl packages correctly, so I guess this issue may be originated from Rocky Linux software repository. Anyway, your helping tips give me a deeper insight on installed software checking, thank you very much for your help.

Athens

Hi Athens,

These “ERROR” messages seem to becoming quite common both in CentOS 8.4 and Rocky Linux 8.4… and, I suspect, in Alma Linux as well. There is a defined pattern that occurs now when you update the machine.

The First thing you see this:

Last metadata expiration check: 1:33:49 ago on Saturday, August 14, 2021 AM06:22:04 HKT.

The Second thing you see is a list of ERROR/S – if there are any.

The Third thing you see are the ERROR/S – if any – listed in ( ) at the very beginning.

The Fourth thing you see at the very bottom is the following: “(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)”.

My first thing use to be to use “–skip-broken” but I was corrected that this is a BAD Idea. The second thing I tried was to HAND EDIT all the conflicting files, but this could eat up HOURS of time, since you had to find the correct file/s and erase them one by one. The third thing I done with great success twice now is the first suggestion is to “add --allowerasing”. However as was recently pointed out to me this can be VERY DANGEROUS.

Indeed while I was in the process of converting CentOS 8.4 => Rocky Linux 8.4 I got all the way to the very end when suddenly I was confronted by a list of ERRORS. To be specific 92 of them – 90 dependency errors and 2 package errors. I bailed out and said NO!! But then I scrolled up to see what these “ERRORS” were – “curiosity killed the cat, but satisfaction brought him back”. When I did all these “ERRORS” had to do with packages or dependencies that were never used, or seldom used, yet were conflicting with dependencies or packages that were being used. So I went back and ran the command dnf update --allowerasing those 92 packages were erased, and the conversion went forth to completion, and now I have a fully functioning Rocky Linux 8.4 OS.

SUGGESTION: Should you get confronted by this strange situation again run dnf update or upgrade --allowerasing HOWEVER before you say YES see exactly what it want to erase first… especially if it is greater than 50 packages or dependencies. If the conflicting packages or dependencies are marked never used there is a good chance they can be safely deleted. The proposition being if these dependencies are never used or seldom used, then they will not be missed if you delete them. Usually after that allowerasing I then run dnf update, and there maybe a handful of dependencies – usually current – that need to be replaced.

Hope this helps.

D’ Cat

Hi desercat,

Thanks for your sharing, I will try your method if I catch by similar issue again. However, I wonder why such kind of issue occur on Red Hat Linux 8.4 variants? I never get these errors on CentOS 7 and early version of CentOS 8.

Athens

This is an old post but I just wanted to add that there was a problem with perl doing this for a while, where the module needed to be explicitly enabled to fix:
dnf module enable perl

The bug might be fixed by now, but if not the above command should (hopefully) get things working for you.

Hi pajamian,

Thanks for your share, as I check my system, Perl module has already enabled. Anyway, thank you very much.

Athens