Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It would appear that the version I have of php-common-5.2.10-1.el5.centos is newer than the one being asked for as a dependency of php-xml when I try to install php-xml using yum install php-xml. The dependent package asked for is php-common = 5.1.6-34.el5_8 as shown by rpm -qa |grep php.

So how would I force php-xml to use the later verion I already have?

(This seems to be the root cause of the problem in related SF question: php-xml install complains of dependency php-common but this is already installed (CentOS) )


output of:

  • yum repolist
  • rpm -qi php-common

(as requested by @ewwhite )is as follows:

[root@dtsrvishvt2 ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
Reducing CentOS-5 Testing to included packages only
repo id                          repo name                                status
base                             CentOS-5 - Base                          2,725
c5-testing                       CentOS-5 Testing                          0+71
extras                           CentOS-5 - Extras                          280
updates                          CentOS-5 - Updates                         379
repolist: 3,384
[root@dtsrvishvt2 ~]#

[root@dtsrvishvt2 ~]# rpm -qi php-common
Name        : php-common                   Relocations: (not relocatable)
Version     : 5.2.10                            Vendor: CentOS
Release     : 1.el5.centos                  Build Date: Fri 13 Nov 2009 04:36:29 PM GMT
Install Date: Tue 13 Jul 2010 11:33:44 AM GMT      Build Host:
Group       : Development/Languages         Source RPM: php-5.2.10-1.el5.centos.src.rpm
Size        : 668395                           License: PHP
Signature   : DSA/SHA1, Fri 22 Jan 2010 03:22:25 PM GMT, Key ID 5c37c0b17203f491
URL         :
Summary     : Common files for PHP
Description :
The php-common package contains files used by both the php
package and the php-cli package.
[root@dtsrvishvt2 ~]#
share|improve this question
up vote 3 down vote accepted

Could you provide the output of the following commands?

  • yum repolist
  • rpm -qi php-common

The current version of php-common for your CentOS 5 system is php-common-5.1.6-34.el5_8. Your dependency issue stems from the presence of a newer version of php-common (5.2.10-1.el5.centos) than what is available in the standard CentOS repository. The yum repolist command will help us understand where you're pulling your packages from. The rpm -qi php-common will show us where the currently installed package actually came from.

My guess is that the system was moved to PHP 5.2 using another repo, or maybe by a manual package installation. This has been documented online with the use of the CentOS Testing repository. If your php-common package was a one-off installation, then you should be able to grab the relevant php packages... but this depends on your repolist output...

share|improve this answer
+1 @ewwhite thanks for your input, I've updated the question with the output that you suggested – therobyouknow May 23 '12 at 15:44
The problem is the C5-testing repository. The PHP 5.2 packages have been removed from the Centos5-Testing repo (security reasons). You can probably remove the repo and the php package, going back to 5.1, or try to find a way to move to php 5.3. – ewwhite May 23 '12 at 15:54
+1 @ewwhite for your comment - which seals your answer as the accepted - thanks. In summary I should try to move to php 5.3. Thanks. – therobyouknow May 24 '12 at 7:55
Full steps on how to upgrade CentOS 5.4 to PHP-5.3 are detailed here (working as of May 2012 - repos and paths exist and work):… – therobyouknow May 24 '12 at 13:18

You can't, yum won't let you. The authors of php-xml specifically want a version of php-common that matches theirs.

Your choices are:

  1. Find a newer version of the php-xml rpm
  2. Downgrade php-common to version 5.2.10-1.el5.centos
  3. Use rpm -i --nodeps to perform an unsafe install that may not work right (since you are not installing any dependencies).
  4. Rebuild the php-xml rpm, changing the version of php-commons that it depends on

I strongly recommend one of the first two, since they are easiest and have the best chance of working correctly.

share|improve this answer
+1 @Konstantin Naryshkin: "Find a newer version of the php-xml rpm" - this corroborates with the accepted answer to upgrade to php 5.3: presumably 5.3 uses a later version of php-xml. – therobyouknow May 24 '12 at 8:03

You cannot use php-commons version 5.2* as it has been removed due to a security issue. The only option left is to upgrade to PHP 5.3. It took me about 4 hours to find this information online so hopefully this will help someone else.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.