skip to Main Content

When I run sudo yum install php56 on my centos7 ec2 instance, the actual version installed is 5.4.

Installing:
php                x86_64      5.4.16-46.amzn2.0.2       amzn2-core      1.4 M
php-cli            x86_64      5.4.16-46.amzn2.0.2       amzn2-core      2.8 M

I canceled that and tried an archive sudo yum install --enablerepo=ius-archive php56u and got an dependency error:

--> Finished Dependency Resolution
Error: Package: php56u-common-5.6.40-1.ius.el7.x86_64 (ius-archive)
       Requires: php56u-pecl-jsonc(x86-64)
       Available: php56u-pecl-jsonc-1.3.6-2.ius.el7.x86_64 (ius-archive)
           php56u-pecl-jsonc(x86-64) = 1.3.6-2.ius.el7
       .....

How do I resolve that package?

I have considered building php 5.6 from source using steps from this site but it is quite long and complicated and I am not an expert. I would rather figure out how to fix the dependency error above.

Any other ideas on how I can get php 5.5+ (I cannot do php7) on this Amazon Linux 2 machine?

2

Answers


  1. Chosen as BEST ANSWER

    I 'fixed' my issue, though not by installing php 5.6. In the end I realized I was spending alot of time trying to get old unsupported code when I could instead spend that time making my code work with php 7/Maria - something I would eventually have to do anyways. Yes, it's taken a few days to work out the kinks, but it's time well spent. Adios PHP5.

    I won't mark this as an answer since it doesn't directly address the challenge.


  2. IUS is not compatible with Amazon Linux. Anything that happens to work is pure luck and should not be counted on.

    https://ius.io/faq#is-ius-compatible-with-amazon-linux

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search