How to fix package conflict between ruby and pcs?

Solution Verified - Updated -

Issue

  • After ruby module switching process finishes, pcs package is removed unexpectedly due to hard dependency on specific ruby version ( ruby 2.5 in RHEL 8 ), now pcs package reinstallation is required in such a situation. But the installation attempt failed with error below:

    # yum install pcs
    Updating Subscription Management repositories.
    Last metadata expiration check: 2:41:59 ago on Wed 18 Oct 2023 06:38:11 PM EDT.
    Error: 
     Problem: package pcs-0.10.15-4.el8_8.1.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
      - cannot install the best candidate for the job
      - package ruby-libs-2.5.3-103.module+el8+2671+ebcc7ee0.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.3-104.module+el8.0.0+3250+4b7d6d43.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.5-106.module+el8.3.0+7153+c6f6daa5.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.9-107.module+el8.4.0+10822+fe4fffb1.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.9-107.module+el8.5.0+13840+ec418553.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.9-109.module+el8.5.0+14275+d9c243ca.x86_64 is filtered out by modular filtering
      - package ruby-libs-2.5.9-110.module+el8.6.0+15956+aa803fc1.x86_64 is filtered out by modular filtering
    (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
    
  • In RHEL 8 (8.10 or below), package pcs is known to have a hard dependency on Ruby 2.5, as described in kb 7026152. For example, in this case, the ruby module stream was changed from 2.5 to 3.0.

    # dnf module list ruby
    Updating Subscription Management repositories.
    Last metadata expiration check: 2:34:43 ago on Wed 18 Oct 2023 06:38:11 PM EDT.
    Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
    Name                             Stream                              Profiles                              Summary                                                                        
    ruby                             2.5 [d]                             common [d]                            An interpreter of object-oriented scripting language                           
    ruby                             2.6                                 common [d]                            An interpreter of object-oriented scripting language                           
    ruby                             2.7                                 common [d]                            An interpreter of object-oriented scripting language                           
    ruby                             3.0 [e]                             common [d]                            An interpreter of object-oriented scripting language   <=ruby 3.0 enabled                         
    ruby                             3.1                                 common [d]                            An interpreter of object-oriented scripting language 
    
  • Similar conflicts may be observed in higher RHEL versions, and different ruby module streams.

Environment

  • Red Hat Enterprise Linux 7 or higher ( w/ High-Availability Add-on )
  • ruby
  • pcs

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content