title: How can I install PHP 5.56 on Amazon Linux 2 CentOS7?
body: <p>When I run <code>sudo yum install php56</code> on my centos7 ec2 instance, the actual version installed is 5.4. </p>
  
  <pre><code>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
  </code></pre>
  
  <p>I canceled that and tried an archive <code>sudo yum install --enablerepo=ius-archive php56u</code> and got an dependency error:</p>
  
  <pre><code>--&gt; 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
         .....
  </code></pre>
  
  <p>How do I resolve that package?</p>
  
  <p>I have considered building php 5.6 from source using <a href="https://blacksaildivision.com/php-install-from-source" rel="nofollow noreferrer">steps from this site</a> 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.</p>
  
  <p>Any other ideas on how I can get php 5.5+ (I cannot do php7) on this Amazon Linux 2 machine?</p>