I have php 5.1.6 installed on a centOS server, and I need at least 5.3.2 (but would rather install the latest available 5.* version).
If I run
yum update php
it says it will update to 5.1.6-34.el5_8 (mine is 5.1.6-27.el5_5.3)..... what the heck????
Are the available packages for centOS THAT much behind the current version, or is it because yum will by default only update within the subversion after the second dot (or something) and I need to tell it to give me a more recent version? If so how do I do that?
You are most likely running old version of Centos (5.5 or even earlier), which doesn't have PHP 5.2.x or 5.3.x in it's repos. You have 2 options: update Centos to a more recent version (5.6 is the first one with PHP 5.3) or use http://iuscommunity.org/About
Yes, as I recall getting a newer version of php on CentOs 5.x was mighty painful.
Basically there is a php53 package in the updates repos;
but if you run something like this;
you will see that
php53
package does not actually provide php, which means that installing it will break any packages that depend onphp
, despite there being a php on the system.In the end I used a shim rpm that just contained a single provides line, which I found somewhere on the web because all my php requirements were simple.
The alternatives are as @c2h5oh mentioned, to use a 3rd party re-packaged version, (or to upgrade to Centos 6.2 :-< ).
You can see what replacing all the
php
withphp53
will break with the following command;You can see from the output of that last command, that in my case I wasn't using any packages that require
php
that were important, so I just did used--nodeps
to force remove all the php.You can use
yum shell
to perform theremove
(ofphp-*
) andinstall
(ofphp53-*
) operations in the same transaction.Use
yum update
, thenyum upgrade
to upgrade CentOS to 5.8, then retryyum update php