Package X requires Y, but none of the providers can be installed

I am trying to update my AlmaLinux installation, but I am getting these errors. What’s the best way to update everything without breaking anything?

Repository powertools is listed more than once in the configuration
Last metadata expiration check: 0:01:54 ago on Thu 18 May 2023 12:15:11 PM CEST.
Error:
Problem 1: cannot install both cups-libs-1:2.2.6-51.el8.x86_64 and cups-libs-1:2.2.6-50.el8.x86_64

  • package cups-1:2.2.6-50.el8.x86_64 requires cups-libs(x86-64) = 1:2.2.6-50.el8, but none of the providers can be installed
  • cannot install the best update candidate for package cups-libs-1:2.2.6-50.el8.x86_64
  • cannot install the best update candidate for package cups-1:2.2.6-50.el8.x86_64
    Problem 2: cannot install both libgomp-8.5.0-18.el8.alma.x86_64 and libgomp-8.5.0-16.el8_7.alma.x86_64
  • package gcc-8.5.0-16.el8_7.alma.x86_64 requires libgomp = 8.5.0-16.el8_7.alma, but none of the providers can be installed
  • cannot install the best update candidate for package libgomp-8.5.0-16.el8_7.alma.x86_64
  • cannot install the best update candidate for package gcc-8.5.0-16.el8_7.alma.x86_64
    Problem 3: package libstdc+±devel-8.5.0-16.el8_7.alma.x86_64 requires libstdc++(x86-64) = 8.5.0-16.el8_7.alma, but none of the providers can be installed
  • cannot install both libstdc+±8.5.0-18.el8.alma.x86_64 and libstdc+±8.5.0-16.el8_7.alma.x86_64
  • cannot install the best update candidate for package libstdc+±devel-8.5.0-16.el8_7.alma.x86_64
  • cannot install the best update candidate for package libstdc+±8.5.0-16.el8_7.alma.x86_64
    Problem 4: cannot install both perl-interpreter-4:5.26.3-422.el8.x86_64 and perl-interpreter-4:5.26.3-421.el8.x86_64
  • package perl-4:5.26.3-421.el8.x86_64 requires perl-interpreter(x86-64) = 4:5.26.3-421.el8, but none of the providers can be installed
  • cannot install the best update candidate for package perl-interpreter-4:5.26.3-421.el8.x86_64
  • cannot install the best update candidate for package perl-4:5.26.3-421.el8.x86_64
    Problem 5: cannot install both perl-libs-4:5.26.3-422.el8.x86_64 and perl-libs-4:5.26.3-421.el8.x86_64
  • package perl-devel-4:5.26.3-421.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-421.el8, but none of the providers can be installed
  • cannot install the best update candidate for package perl-libs-4:5.26.3-421.el8.x86_64
  • cannot install the best update candidate for package perl-devel-4:5.26.3-421.el8.x86_64
    Problem 6: package rpm-build-4.14.3-24.el8_7.x86_64 requires rpm = 4.14.3-24.el8_7, but none of the providers can be installed
  • cannot install both rpm-4.14.3-26.el8.x86_64 and rpm-4.14.3-24.el8_7.x86_64
  • cannot install the best update candidate for package rpm-build-4.14.3-24.el8_7.x86_64
  • cannot install the best update candidate for package rpm-4.14.3-24.el8_7.x86_64
    Problem 7: cannot install both libstdc+±8.5.0-18.el8.alma.x86_64 and libstdc+±8.5.0-16.el8_7.alma.x86_64
  • package gcc-c+±8.5.0-16.el8_7.alma.x86_64 requires libstdc++ = 8.5.0-16.el8_7.alma, but none of the providers can be installed
  • libstdc+±8.5.0-18.el8.alma.i686 has inferior architecture
  • cannot install both libstdc+±8.5.0-18.el8.alma.i686 and libstdc+±8.5.0-16.el8_7.alma.i686
  • cannot install the best update candidate for package libstdc+±8.5.0-16.el8_7.alma.i686
  • cannot install the best update candidate for package gcc-c+±8.5.0-16.el8_7.alma.x86_64
    Problem 8: cannot install both perl-libs-4:5.26.3-422.el8.x86_64 and perl-libs-4:5.26.3-421.el8.x86_64
  • package perl-utils-5.26.3-421.el8.noarch requires perl-libs = 4:5.26.3-421.el8, but none of the providers can be installed
  • cannot install both perl-libs-4:5.26.3-422.el8.i686 and perl-libs-4:5.26.3-421.el8.i686
  • package perl-Errno-1.28-422.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8, but none of the providers can be installed
  • cannot install the best update candidate for package perl-utils-5.26.3-421.el8.noarch
  • cannot install the best update candidate for package perl-libs-4:5.26.3-421.el8.i686
  • cannot install the best update candidate for package perl-Errno-1.28-421.el8.x86_64
    Problem 9: problem with installed package rpm-build-4.14.3-24.el8_7.x86_64
  • package rpm-build-4.14.3-24.el8_7.x86_64 requires rpm = 4.14.3-24.el8_7, but none of the providers can be installed
  • cannot install both rpm-4.14.3-26.el8.x86_64 and rpm-4.14.3-24.el8_7.x86_64
  • package rpm-libs-4.14.3-26.el8.x86_64 requires rpm = 4.14.3-26.el8, but none of the providers can be installed
  • cannot install the best update candidate for package rpm-libs-4.14.3-24.el8_7.x86_64
    (try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–nobest’ to use not only best candidate packages)

I have similar problem.

Error:
 Problem 1: package perl-devel-4:5.26.3-422.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8, but none of the providers can be installed
  - cannot install both perl-libs-4:5.26.3-422.el8.0.1.x86_64 and perl-libs-4:5.26.3-422.el8.x86_64
  - cannot install both perl-libs-4:5.26.3-422.el8.x86_64 and perl-libs-4:5.26.3-422.el8.0.1.x86_64
  - cannot install the best update candidate for package perl-libs-4:5.26.3-422.el8.x86_64
  - cannot install the best update candidate for package perl-devel-4:5.26.3-422.el8.x86_64
 Problem 2: problem with installed package perl-devel-4:5.26.3-422.el8.x86_64
  - package perl-devel-4:5.26.3-422.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8, but none of the providers can be installed
  - cannot install both perl-libs-4:5.26.3-422.el8.0.1.x86_64 and perl-libs-4:5.26.3-422.el8.x86_64
  - cannot install both perl-libs-4:5.26.3-422.el8.x86_64 and perl-libs-4:5.26.3-422.el8.0.1.x86_64
  - package perl-Errno-1.28-422.el8.0.1.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8.0.1, but none of the providers can be installed
  - cannot install the best update candidate for package perl-Errno-1.28-422.el8.x86_64
 Problem 3: perl-devel-4:5.26.3-422.el8.i686 has inferior architecture
  - package perl-ExtUtils-Miniperl-1.06-422.el8.noarch requires perl-devel, but none of the providers can be installed
  - package perl-devel-4:5.26.3-422.el8.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8, but none of the providers can be installed
  - cannot install both perl-libs-4:5.26.3-422.el8.0.1.x86_64 and perl-libs-4:5.26.3-422.el8.x86_64
  - cannot install both perl-libs-4:5.26.3-422.el8.x86_64 and perl-libs-4:5.26.3-422.el8.0.1.x86_64
  - package perl-interpreter-4:5.26.3-422.el8.0.1.x86_64 requires perl-libs(x86-64) = 4:5.26.3-422.el8.0.1, but none of the providers can be installed
  - cannot install the best update candidate for package perl-interpreter-4:5.26.3-422.el8.x86_64
  - cannot install the best update candidate for package perl-ExtUtils-Miniperl-1.06-422.el8.noarch
  - package perl-devel-4:5.24.4-404.module_el8.1.0+6019+b22674e1.x86_64 is filtered out by modular filtering
  - package perl-devel-4:5.30.1-452.module_el8.4.0+2179+01326e37.x86_64 is filtered out by modular filtering
  - package perl-devel-4:5.32.1-472.module_el8.8.0+3492+a62a1135.x86_64 is filtered out by modular filtering
(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)

perl-libs-5.26.3-422.el8.x86_64 was installed, but cannot remove it, because it’s used for many other packages.

Any idea to fix?
Thanks.

Try updating the packages with “dnf” instead of “yum”. That worked for me.

Based on previous upgrades, this may be due to something in EPEL demanding a precise version and not accepting an upgraded library. Generally it will go away in a few days. If you are feeling brave you could try EPEL-testing or EPEL-next, but if it breaks you get to keep the pieces!

# ls -l /bin/yum /bin/dnf
lrwxrwxrwx 1 root root 5 Oct 12  2022 /bin/dnf -> dnf-3
lrwxrwxrwx 1 root root 5 Oct 12  2022 /bin/yum -> dnf-3

So yum and dnf are actually exactly the same php code.