1

I have created my application's RPM file and trying to install it on CentOS 6.6. My Application requires PHP >= 5.4 which I mentioned as Requires: php >= 5.4 in the SPEC file of RPM. But when I try to install the RPM, I get the following error

Error: Package: myApp-1.0-1.x86_64 (myapp)

           Requires: php >= 5.4
           Available: php-5.3.3-40.el6_6.x86_64 (base)
               php = 5.3.3-40.el6_6
           Available: php-5.3.3-46.el6_6.x86_64 (updates)
               php = 5.3.3-46.el6_6

The server where I am installing this does not have any PHP installed before.

[root@license /]# php --version
-bash: php: command not found

So I am not able to find the root cause. Can someone please help.

Thanks.

1 Answer 1

1

This just means that on CentOS 6 there is no php in version 5.4 or higher. Just version 5.3.3.

You either have to use CentOS 7. Or use SoftwareCollection: https://www.softwarecollections.org/en/scls/rhscl/php55/

2
  • Hello msuchy, basically I know that there is no PHP but when I say Requires: php >= 5.4 in my Spec file, I expect that the RPM should install PHP 5.4 but instead I get that error message. How can I do avoid the error and get the PHP5.4 installed while executing RPM? Commented Aug 25, 2015 at 13:51
  • 1
    The packages are installed from repositories. Somebody have to put those packages there first. CentOS 6 was release in 2010 and since then it receive only binary compatible updates. It is very stable OS and does not change. On the other hand PHP 5.4 was released in 2012. So it is not (and will not be) present in CentOS 6 package repository. Just saying that you Requires: php >= 5.4 will not pull this package from the air.
    – msuchy
    Commented Aug 26, 2015 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.