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

I have followed the wget method here hoping it was my solution:

Howto install php 5.2.17 on centos 6 x86_64

However I get the following error when trying to install:

# rpm -ivh php-5.2.17-1.x86_64.rpm
error: Failed dependencies: is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64
        php-cli = 5.2.17-1 is needed by php-5.2.17-1.x86_64

Would be awesome if someone could help.


I have now installed an instance of CentOS 5 and am attempting to install php 5.2.17 yet again...anyone know the best way to deal with the following dependencies: is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64 is needed by php-5.2.17-1.x86_64
    php-cli = 5.2.17-1 is needed by php-5.2.17-1.x86_64
    php-common = 5.2.17-1 is needed by php-5.2.17-1.x86_64

Wondering what libgmp, libaspell, php-cli and php-common are and where to get the proper versions for php 5.2.17.

Any help is most appreciated.

Thank you!

share|improve this question
Why do you want to run an old version of PHP? – voretaq7 Feb 8 '12 at 21:06
where did you get this rpm? is it actually patched for any of the recently discovered vulnerabilities which have been discovered in php? Since support for 5.2 is dropped upstream, do you have any plan to incorporate future security fixes? or is security just going out the window here? Moving your application to a current version of php is probably a better plan. – stew Feb 8 '12 at 21:34
I am 100% in the know that this site needs to be made recent in regards to many things...especially php. However I have to set up a dev environment first...I mean I cant just start upgrading php on a production server right? Where should I download the best rpm for php 5.2.17? – user1114330 Feb 8 '12 at 22:17
up vote 1 down vote accepted

php-cli 5.2.17-1 is required. That's available on the site that you found in the earlier ServerFault posting, so you should get that RPM file also.

You are going to have bad problems with the other dependencies, however. For example, belongs to an older openssl package compared to what's standard on CentOS6. I'm not sure what the best way to handle this would be: you can go back to a CentOS5 box, and it'll be a lot easier dealing with those other dependencies there because they match with the CentOS5 version of, say, openssl.

If you can't do that, you will be in for some amount of pain and suffering. You can build PHP packages from source, which should work (make sure you get, say, libcurl-dev installed and so on), but that opens up a different can of worms. If you go down that path, it looks like that site has the php 5.2 spec file at

But it should be noted that building your own packages may not be the best idea, since you may miss the frequent PHP security updates in the not too distant future.

share|improve this answer
Ok I get it..starting with CentOS 5 is not a problem. Wondering if downgrading is a better option? This is already starting to hurt...need to move this site to another server badly. Had no clue this would be as much of a hold up as it is. – user1114330 Feb 8 '12 at 22:08
You don't want to downgrade things like openssl. That would be an even worse path to take. Arguably, the best option would be to get the application to run on PHP 5.3. – cjc Feb 8 '12 at 22:26
I am in the process of doing that..I have to set up a dev environment first for some minor changes the client wants before upgrading to php 5.3. – user1114330 Feb 8 '12 at 22:30
Attempting this from CentOS 5 now...still dealing with dependencies...any thoughts? – user1114330 Feb 8 '12 at 23:37
Following your update: is in gmp-4.1.4-10.el5 and the other two are aspell-0.60.3-7.1. Those are standard CentOS5 packages. So, "yum install gmp aspell". The php-cli and php-common should be available from the same site you downloaded the 5.2 RPM. So, after downloading the two rpms, do "rpm -ihv php*" (assuming the 3 php rpms are the only thing named php* in the directory). – cjc Feb 9 '12 at 0:50

I might suggest that you get the latest version of php available on Centos 6.x which is can do this and grab all the dependencies automagically using:

 yum update php\*


 yum install php\*

as the root user. I put the * at the end so that you can get all the php packages if you desire to be complete.

share|improve this answer
I wish...I have an old legacy system that at least for now requires 5.2.* – user1114330 Feb 8 '12 at 21:12

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.