On client yum fails to install latest available package though it is available on satellite

Solution Verified - Updated -

Environment

  • Red Hat Satellite or Proxy 5.x

Issue

  • Failed to perform yum install for php-match although dependency package php-common is already installed on client.

  • Performed yum install php-bcmath.x86_64 as

[root@xyz ~]# yum install php-bcmath.x86_64
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.3.3-27.el6_5.1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5.1 for package: php-bcmath-5.3.3-27.el6_5.1.x86_64
--> Finished Dependency Resolution
Error: Package: php-bcmath-5.3.3-27.el6_5.1.x86_64 (rhel-x86_64-server-optional-6)
           Requires: php-common(x86-64) = 5.3.3-27.el6_5.1
           Installed: php-common-5.3.3-27.el6_5.x86_64 (@rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-27.el6_5
           Available: php-common-5.3.2-6.el6.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.2-6.el6
           Available: php-common-5.3.2-6.el6_0.1.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.2-6.el6_0.1
           Available: php-common-5.3.3-3.el6.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-3.el6
           Available: php-common-5.3.3-3.el6_1.3.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-3.el6_1.3
           Available: php-common-5.3.3-3.el6_2.5.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-3.el6_2.5
           Available: php-common-5.3.3-3.el6_2.6.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-3.el6_2.6
           Available: php-common-5.3.3-3.el6_2.8.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-3.el6_2.8
           Available: php-common-5.3.3-14.el6_3.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-14.el6_3
           Available: php-common-5.3.3-22.el6.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-22.el6
           Available: php-common-5.3.3-23.el6_4.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-23.el6_4
           Available: php-common-5.3.3-26.el6.x86_64 (rhel-x86_64-server-6)
               php-common(x86-64) = 5.3.3-26.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
  • Host: xyz is configured to Satellite and it has RHEL6 and RHEL6 optional channels:
[root@xyz ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
repo id                                            repo name                                                                      status
rhel-x86_64-server-6                               Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)                       12,210
rhel-x86_64-server-optional-6                      RHEL Server Optional (v. 6 64-bit x86_64)
  • Manually installing php-common-5.3.3-27.el6_5.1.x86_64.rpm resolves the issue. But why even after Satellite system having latest (php-common-5.3.3-27.el6_5.1.x86_64.rpm) package, not able to sync on client ?

Resolution

  • As per the tests done and available output from client
# yum info php-common
# yum info php-bcmath

Client is getting latest php-bcmath but not php-common. Means channel repodata for php-common on client is not in sync with satellite.

  • On satellite run :
# rm /var/satellite/repodata/rhel-x86_64-server-6 -rf

To re generate the channel repodata forcefully on satellite, follow the steps in the resolution section as specified in the article

Note: Replace the channel label in the commands specified with channel label 'rhel-x86_64-server-6' as the php common package is provided by 'rhel-x86_64-server-6' channel.

This action will last for near about 30-40 min, based on channel size. Wait for it to complete. You can verify the progress at log file : /var/log/rhn/rhn_taskomatic_daemon.log , then proceed for next steps below.

  • On client affected system run :
# yum clean all
# rm -rf /var/cache/yum/*
# rhn-profile-sync
# yum info php-common
# yum install php-bcmath

Root Cause

  • Clients's channel repodata was not in sync with satellite's channel package listing.

Diagnostic Steps

  • From affected client's sosreport :
# less installed-rpms | grep php
php-common-5.3.3-27.el6_5.x86_64     Mon Sep  1 05:25:42 2014
  • However, the required php-common package is of version 'php-common(x86-64) = 5.3.3-27.el6_5.1'
1. Hence, removed the existing php-common package by :
# rpm -evh php-common

Verify the old package is successfully removed using:
# rpm -qa |grep php

2. Then download and install the required (php-common-5.3.3-27.el6_5.1.x86_64.rpm) package from customer portal [link](https://rhn.redhat.com/rhn/software/packages/details/Overview.do?pid=987884)

# rpm -ivh php-common-5.3.3-27.el6_5.1.x86_64.rpm           --> Install the package from downloaded location on your system.

3. Then try to install the php-bcmath package :
# yum install php-bcmath

* This workaround works but satellite system do has (php-common-5.3.3-27.el6_5.1.x86_64.rpm) and is not getting it?

Performed the following steps :
# rhn-profile-sync      --> on satellite and client  
  • Tried to reproduce this issue on test machines with similar environment. However, it is resolving dependencies and installing php-bcmath package without any errors.
root@xyz ~]# yum info php-common
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
This system is not registered to Red Hat Subscription Management. You can use su                          bscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Available Packages
Name        : php-common
Arch        : x86_64
Version     : 5.3.3
Release     : 27.el6_5
Size        : 525 k
Repo        : rhel-x86_64-server-6
Summary     : Common files for PHP
License     : PHP
Description : The php-common package contains files used by both the php
            : package and the php-cli package.

[root@xyz ~]# yum info php-bcmath
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
              : subscription-manager
This system is not registered to Red Hat Subscription Management. You can use su                          bscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Available Packages
Name        : php-bcmath
Arch        : x86_64
Version     : 5.3.3
Release     : 27.el6_5.1
Size        : 36 k
Repo        : rhel-x86_64-server-optional-6
Summary     : A module for PHP applications for using the bcmath library
License     : PHP
Description : The php-bcmath package contains a dynamic shared object that will
            : add support for using the bcmath library to PHP.
  • Hence, on client side channel repodata is not in sync with satellite's channel repodata. So, generated channel repodata for channel rhel-x86_64-server-6 forcefully which resolved the issue. Client is able to resolve dependency and got the latest php-common package.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments