Good day!

Please tell me how to replace php 7 with php 5

My parameters:

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty PHP Version 7.0.9-1+deb.sury.org~trusty+1 

My actions:

 sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get update sudo apt-get upgrade sudo apt-get install php5 

I already broke the whole thing a couple of times. Please tell me the steps of painless actions so that it all works with the php5.6 version.

thank

  • 2
    no need to add any left repositories. The official repository contains the php5 package (and derivatives). // approximate algoritm: 1. remove the “left” repositories. 2. Update the package list. 3. remove everything related to php. 4. install php5 - aleksandr barakin

1 answer 1

sudo add-apt-repository ppa:ondrej/php5-5.6

no need to add any "left" repositories.

After all, in the official repository there is a package php5 (and derivatives).


approximate algorithm:

  1. remove the “left” repositories (see files in /etc/apt/sources.d/ )
  2. update the package list ( sudo apt-get update )
  3. remove everything related to php ( sudo apt-get purge 'php.*' )
  4. Install the php5 package and necessary additional packages.