Reputation: 55
have recently installed 20.04 beta on my Laptop. I need to install php 5.6. I have googled a lot regarding it, but all are suggesting to install Via Ondrej Suri PPA. I have done that but it is giving error that 'unable to locate package php5.6'. I have checked their repository and found that they have support for 19.10 version but not for 20.04.
I have tried to find other methods but unable to find any. I am a noob on linux.
Please suggest an alternate way. I badly need this.
Upvotes: 4
Views: 25096
Reputation: 321
You need to configure repository on your system.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
Then update repo
sudo apt update
Once the update complete, you can install any version from 5.6 to 7.4
sudo apt install -y php5.6
Or
sudo apt install -y php7.4
Upvotes: 11
Reputation: 21
Docker is your friend.
Alternatively you could use phpbrew.
After some time it might be that someone releases pre-built packages for PHP 5.6 but apparently that's not yet (and may never be, so don't count on it).
Upvotes: 2