Question

Not able to install php 5.6 on Ubuntu 10.04

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’


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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