skip to Main Content

I have successfully installed apache 2.4.34 onto my instance but I am unable to install PHP7. I have tried the following:

 sudo yum install php70

But I get the following error:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package php70 available.
Error: Nothing to do

2

Answers


  1. It could be possible that you are missing the right name. Check what php version is there with the command:

    yum search php70
    

    After that you should see a php version name. Copy and paste it to your command like:

    yum install <php version name>
    

    Make sure you put the whole php version name and don’t forget to restart your apache!!!

    Login or Signup to reply.
  2. apt-get update && apt-get upgrade
    apt-get install software-properties-common
    add-apt-repository ppa:ondrej/php
    apt-get update
    apt-get install php<Your desired version>

    Confirm it installed by running:
    php -V

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