I used all of method to install the php
sudo add-apt-repository -y ppa:ondrej/php sudo apt update sudo apt-get install -y php5.6
still got this error –
Reading package lists… Done Building dependency tree
Reading state information… Done E: Unable to locate package php5.6 E: Couldn’t find any package by regex ‘php5.6’
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.