I am attempting to install PHP 5.6 on Ubuntu 14.04. I have tried a whole raft of different things and none of them work. To start with I have tried to download via this repo:
sudo add-apt-repository ppa:ondrej/php5-5.6
Followed by:
sudo apt install php5
As most of the Google results I can find tell me to do, but when I check php -v
I find I am still on 5.9.9, which is no use for what I need.
I have also tried:
sudo apt install php5.6
As I have seen listed elsewhere, but I just get a message saying the repository does not exist.
I have also tried installing using this repository:
sudo add-apt-repository ppa:ondrej/php5
As listed in this question: PHP 5.6 not used by Apache instead it uses PHP 5.5
But the repository doesn't appear to exist any more.
I have also tried installing PHP 5.6.10 and 5.6.12 from tarballs, but I can't seem to get the installation instructions contained within the tarballs to work, and running either make
or make install
from within the directory that contains Makefile.frag, Makefile.gov etc does nothing.
Is there another way to install the required version of PHP, or can anyone perhaps give me instructions on how to install either of the above tarballs now I have unzipped and untarred them? I found a guide suggesting to find the 'dbase' folder but this does not appear to exist with these particular versions of PHP.
I have also tried installing PHP 7.0 but have found this doesn't work with the Laravel repository I need to work with (I have also tried using Vagrant Homestead to install the right version of PHP, but this has produced other issues on my system).
I have attempted to run
./configure
make
make install
In the root directory the tarball has untarred to, but although the ./configure seems to work fine, when I run make
I see:
make: *** No targets specified and no makefile found. Stop.
I have already tried running:
sudo apt-get install libapache2-mod-php5.6
As per the answer to the linked to similar question marked as possible duplicate of mine. Which results in this output:
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libapache2-mod-php5.6 E: Couldn't find any package by regex 'libapache2-mod-php5.6'"
Even after adding this repository:
sudo add-apt-repository ppa:ondrej/apache2