[SOLVED] php-xml install complains of dependency php-common but this is already installed(CentOS5.4)

Issues related to software problems.
Post Reply
therobyouknow
Posts: 5
Joined: 2012/05/23 10:37:46

[SOLVED] php-xml install complains of dependency php-common but this is already installed(CentOS5.4)

Post by therobyouknow » 2012/05/23 10:45:20

How do I force php-xml to see the already installed dependency?

sudo yum install php-xml
complains about:

php-common = 5.1.6-34.el5_8
but running yum install php-common

php-common-5.1.6-34.el5_8.i386 already installed


[root@dtsrvishvt2 /]# sudo yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.manchester.icecolo.com
* extras: mirrors.manchester.icecolo.com
* updates: mirrors.manchester.icecolo.com
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php-xml
--> Finished Dependency Resolution
php-xml-5.1.6-34.el5_8.i386 from updates has depsolving problems
--> Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.


[root@dtsrvishvt2 /]# yum install php-common
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tudelft.nl
* extras: mirrors.coreix.net
* updates: mirrors.coreix.net
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Package matching php-common-5.1.6-34.el5_8.i386 already installed. Checking for update.
Nothing to do
[root@dtsrvishvt2 /]#



I have tried the suggested clean-ups and reran the commands. I also ran yum install php-common again, first as it was the dependency then yum install php-common.

[root@dtsrvishvt2 /]# package-cleanup --problems
Setting up yum
Reading local RPM database
Processing all local requires
No problems found
[root@dtsrvishvt2 /]# package-cleanup --dupes
Setting up yum
[root@dtsrvishvt2 /]# rpm -Va --nofiles --nodigest
[root@dtsrvishvt2 /]#



Tried yum clean all but still failed


[root@dtsrvishvt2 /]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@dtsrvishvt2 /]# yum install php-xml
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: centos.mirroring.pulsant.co.uk
* extras: centos.mirroring.pulsant.co.uk
* updates: centos.mirroring.pulsant.co.uk
addons | 1.9 kB 00:00
addons/primary_db | 1.1 kB 00:00
base | 1.1 kB 00:00
base/primary | 967 kB 00:00
base 2725/2725
c5-testing | 1.9 kB 00:00
c5-testing/primary_db | 1.5 MB 00:02
extras | 2.1 kB 00:00
extras/primary_db | 169 kB 00:00
updates | 1.9 kB 00:00
updates/primary_db | 345 kB 00:00
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php-xml
--> Finished Dependency Resolution
php-xml-5.1.6-34.el5_8.i386 from updates has depsolving problems
--> Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
[root@dtsrvishvt2 /]#




Then tried re-running the commands, first yum install php-xml - failed, perhaps the dependency first then? so, yum install php-common - already installed as we've seen before, so again yum install php-xml - still failed :-



[root@dtsrvishvt2 /]# yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirroring.pulsant.co.uk
* extras: centos.mirroring.pulsant.co.uk
* updates: centos.mirroring.pulsant.co.uk
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php-xml
--> Finished Dependency Resolution
php-xml-5.1.6-34.el5_8.i386 from updates has depsolving problems
--> Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
[root@dtsrvishvt2 /]# yum install php-common
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirroring.pulsant.co.uk
* extras: centos.mirroring.pulsant.co.uk
* updates: centos.mirroring.pulsant.co.uk
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Package matching php-common-5.1.6-34.el5_8.i386 already installed. Checking for update.
Nothing to do
[root@dtsrvishvt2 /]# yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirroring.pulsant.co.uk
* extras: centos.mirroring.pulsant.co.uk
* updates: centos.mirroring.pulsant.co.uk
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.i386 0:5.1.6-34.el5_8 set to be updated
--> Processing Dependency: php-common = 5.1.6-34.el5_8 for package: php-xml
--> Finished Dependency Resolution
php-xml-5.1.6-34.el5_8.i386 from updates has depsolving problems
--> Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-34.el5_8 is needed by package php-xml-5.1.6-34.el5_8.i386 (updates)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
[root@dtsrvishvt2 /]#

therobyouknow
Posts: 5
Joined: 2012/05/23 10:37:46

Re: php-xml install complains of dependency php-common but this is already installed (CentOS5.4)

Post by therobyouknow » 2012/05/23 13:42:13

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?

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: php-xml install complains of dependency php-common but this is already installed (CentOS5.4)

Post by TrevorH » 2012/05/23 14:35:32

You don't mix and match versions. You either remove the php-common you have now or you go to wherever you got that from and use their php-xml. You should be aware that there was a copy of php 5.2.10 in centos-testing but it was removed because it had numerous security problems. It should not be used in an environment where it's exposed to the internet. There are sane copies of php 5.2 and 5.3 in a third party repo called IUS if you need a more recent php than the 5.1.6 that CentOS provides. Be aware that despite its 5.1.6 designation, if you regularly run `yum update` then you will receive security updates for the CentOS supplied 5.1.6 that will patch vulnerabilities that go unfixed in the php.net supplied version (Redhat backport security fixes to their version).

therobyouknow
Posts: 5
Joined: 2012/05/23 10:37:46

Re: php-xml install complains of dependency php-common but this is already installed (CentOS5.4)

Post by therobyouknow » 2012/05/23 15:47:41

TrevorH - thanks for the advice about removal of the versions - I will look into doing that. Thanks also for the advice about the security.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] php-xml install complains of dependency php-common

Post by pschaff » 2012/05/23 20:01:35

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature, and particularly [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url] and [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url] (where IUS - recommended by [b]TrevorH[/b] - is among those described). Note the warnings and advice about installing and configuring the [url=http://wiki.centos.org/PackageManagement/Yum/Priorities]yum priorities plugin[/url].

You should immediately update to the current release 5.8. 5.4 is seriously obsolete and has numerous known bugs and security issues that have been fixed in subsequent updates. Obsolete releases are not supported, nor is it advisable to be running them. See the [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.6]CentOS 5.6 Release Notes[/url] Section 4 for details on the recommended update procedure for such an old release, and [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.8]CentOS 5.8 Release Notes[/url] for other information.

therobyouknow
Posts: 5
Joined: 2012/05/23 10:37:46

SOLUTION: Full steps for upgrading CentOS 5.4 to php-5.3 for Drupal 7

Post by therobyouknow » 2012/05/24 14:02:39

(Thanks to TrevorH for the direction/clues and to pschaff for corroborating)

Here are the full working steps to upgrade to PHP 5.3 with working repositories as of May 24 2012 ( I provide comments preceded by # - you don't need these, just for your info)

# Comment: sites like http://www.computingunplugged.com/issues/issue201102/00002619001
# provide a good start for remedying the problem whereby we need 5.3 on CentOS 5.4 to run Drupal 7. But although their packages worked at the time, the links are now outdated, and updates to these are below.


# comment: (as of May 2012 - the following work, the reason for failures was use of 1) older packages no longer on the server and 2) change of address of one of the servers to dl.fedoraproject.org/pub/epel (credit to: http://osdir.com/ml/centos/2012-03/msg00057.html )

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm

yum erase php php-pear php-mysql php-cli php-common

yum install php53u php53u-pear php53u-cli php53u-common php53u-gd
yum install php53u-mbstring php53u-mcrypt php53u-mysql php53u-soap
yum install php53u-xml php53u-xmlrpc php53u-bcmath


# After doing the above, php -v shows 5.3.x But on attempting to install Drupal 7 you may get complaint of something "Your PHP installation is too old 5.1.6 Drupal requires at least PHP 5.2.4. See the system requirements page for more information." and php.info shows the same

# The remedy is to simply restart your apache server

service httpd restart

# credit to following for suggesting service httpd restart :-
# http://serverfault.com/a/207806/29205
# http://serverfault.com/questions/207762/centos-updating-php-via-yum-doesnt-change-the-version-apache-uses

# Drupal 7 install on CentOS 5.4 worked after applying the above steps

# If your MySQL server is not running (check by ps -ef | grep mysql ) then you can run:

chkconfig mysqld on

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: [SOLVED] Full steps for upgrading CentOS 5.4 to php-5.3 for Drupal 7

Post by pschaff » 2012/05/24 14:45:06

You are welcome. Thanks for reporting back. Marking this thread [SOLVED] for posterity.

therobyouknow
Posts: 5
Joined: 2012/05/23 10:37:46

Re: [SOLVED] Full steps for upgrading CentOS 5.4 to php-5.3 for Drupal 7

Post by therobyouknow » 2012/05/28 11:57:32

Thank you - good idea [SOLVED] should help people see that there is a solution within.

Just one more thing I should add for the extra (optional) tips at the end of that solution: if you need to start the MySQL server then to start the MySQL server initially, type: /etc/init.d/mysqld start

The other command:

chkconfig mysqld on

...ensures that, once running/if already running, the MySQL is started in the event of a restart or cold start.

The same would apply to Apache:

chkconfig mysqld apache



(These are just extra useful tips in addition to the working solution I already provided about installing PHP - this is complete in itself. Hope these extra tips are also useful. I'm sure many folk here already know this stuff, but for those that don't it will be helpful)

Post Reply