Linux – Installing PHP 5.2.17 Dependencies on Centos 5

centosinstallationlinuxPHPrpm

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:
        libaspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
        libcrypto.so.6()(64bit) is needed by php-5.2.17-1.x86_64
        libcurl.so.3()(64bit) is needed by php-5.2.17-1.x86_64
        libpspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
        libssl.so.6()(64bit) 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.

UPDATE:

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:

 libaspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
    libgmp.so.3()(64bit) is needed by php-5.2.17-1.x86_64
    libpspell.so.15()(64bit) 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!

Best Answer

php-cli 5.2.17-1 is required. That's available on the site that you found in the earlier ServerFault posting, http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/ so you should get that RPM file also.

You are going to have bad problems with the other dependencies, however. For example, libssl.so.6 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 atomicorp.com site has the php 5.2 spec file at http://www6.atomicorp.com/channels/source/php/php-5.2.16.spec

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.