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’
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @sauraj,
Ubuntu 10.04 has reached it’s end of life about 5 years ago - 01.04.2015. It’s pretty old OS and as such it’s bound to cause issues such as not being able to install newer PHP versions. I’ll highly recommend creating a Droplet with Ubuntu 18.04 and migrating your data there!
Anyway, let’s give it a try and install PHP5.6. FIrst, you’ll need to add the proper repository
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
I can see you’ve tried to add it, however can you try and execute the above 3 commands in the given order again?
Once doe, try again to execute
sudo apt install php5.6
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.