Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i'm trying to upgrade php 5.1 to 5.2 on a CentOS 5.4

I use:

yum upgrade php

The result is this (check out the last part):

[root@mail httpd]# yum update php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.raystedman.net
 * base: mirrors.serveraxis.net
 * centosplus: mirrors.tummy.com
 * contrib: mirror.raystedman.net
 * extras: mirror.raystedman.net
 * updates: mirrors.netdna.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: php = 5.1.6-27.el5 for package: php-devel
--> Processing Dependency: php = 5.1.6 for package: php-eaccelerator
---> Package php.x86_64 0:5.2.10-1.el5.centos set to be updated
--> Processing Dependency: php-cli = 5.2.10-1.el5.centos for package: php
--> Processing Dependency: php-common = 5.2.10-1.el5.centos for package: php
--> Running transaction check
--> Processing Dependency: php = 5.1.6 for package: php-eaccelerator
---> Package php-cli.x86_64 0:5.2.10-1.el5.centos set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-xml
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-gd
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-ldap
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mbstring
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-mysql
--> Processing Dependency: php-common = 5.1.6-27.el5 for package: php-imap
---> Package php-common.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-devel.x86_64 0:5.2.10-1.el5.centos set to be updated
--> Running transaction check
--> Processing Dependency: php = 5.1.6 for package: php-eaccelerator
---> Package php-gd.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-imap.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-ldap.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-mbstring.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-mysql.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-pdo.x86_64 0:5.2.10-1.el5.centos set to be updated
---> Package php-xml.x86_64 0:5.2.10-1.el5.centos set to be updated
--> Finished Dependency Resolution
php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 from installed has depsolving problems
  --> Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed)
Error: Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed)
 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@mail httpd]# 

What are the consequences of using --skip-broken? Any recommendations?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Your version of php-eaccelerator is tied to your current version of PHP. Normally, this would be updated automatically but I would guess that this package was either installed manually without using a repository, or the repository just doesn't have a version that will work with the newer PHP you want to install.

If you skip-broken or --exclude php-eaccelerator, PHP will upgrade, but that module will likely not work.

That may be perfectly fine if you can then find a new version php-eaccelerator to install seperately afterwards.

share|improve this answer
    
i ended up removing that module. i still need to install an accelerator, im thinking of APC. –  andufo Jun 24 '11 at 4:03
    
APC is good, personally I prefer xcache, its mostly a preference thing, they compare similarly in benchmarks but I find xcache very simple to manage. And if you ever decide to move to a higher performing webserver rather than Apache, xcache works very well with lighttpd (they're developed by the same person). –  Rafiq Maniar Jun 24 '11 at 14:58
add comment

The --skip-broken option, will exclude the package that cause the error. So if, in your case, the package that get failed dependencie is php. so it'll be exclude.

When I encounter this problem, usually, I remove the package dependencie (that can't be update, or already installed), then do a little yum clean-all, and update/install what I want. If everything went well, I look in the rpm depos website (those : pkgs, rpm pbone, rpmfind ) and do a manual installation of the package I removed.

Hope this will help you.

share|improve this answer
add comment

Remove default PHP with yum remove php. Then you can update to PHP 5.3.x with

yum update php53

This option became available when Centos 5.6. was released. (in April 2011.)

We are all "frustrated" with RHEL/Centos default php (5.1.6). Also the good idea is using additional repos for php/mysql updates (For example Remi, Utter Ramblings, EPEL, CentOS ALT, etc)...

Best regards

share|improve this answer
add comment

Your Answer

 
discard

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.