I recently installed Ubuntu 16.04 LTS (I used to have 14.04 LTS and I had to reinstall everything), since I'm still working with PHP 5.6 I must install lamp environment that'll work with that,

Unfortunately, when I use the command:

sudo apt-get install lamp-server^

it installs PHP 7 and mysql 5.7 which aren't compatible to my project, I tried a few solutions that people suggested here to install php5 alongside with php7 but with no success.

Is there any way to manipulate lamp-server^ installation so it'll install php5.6 as it used to be? I don't need php 7 at all for now.

Thank you

  • Did you try sudo apt-get install php5.6? – pa4080 Aug 31 '16 at 18:55

You can use XAMPP Linux.You can download any version of xampp linux from the below mentioned official xampp site.


Enter downloaded file location using terminal.

First give certain permission for the downloaded binary file. (Assume that i downloaded 64 bit binary package.)

sudo chmod a+x xampp-linux-x64-5.6.23-0-installer.run

Then install the xampp

sudo ./xampp-linux-x64-5.6.23-0-installer.run

If you are download 32 bit binary file do below mentioned like this

sudo chmod a+x xampp-linux-5.6.23-0-installer.run 

sudo ./xampp-linux-5.6.23-0-installer.run

Xampp sourceforge link below.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.