I need to install php5.6 to my Ubuntu 19.10, found out a lot of variants in the internet and almost all of them was the same - to use ppa:ondrej/php

I tried this variant:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

And this:

LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

But after

sudo apt-get install php5.6

nothing seems to work, all i get is message like this or simillar

Note, selecting 'php5.6-json' for regex 'php5.6'
Note, selecting 'php5.6-common' for regex 'php5.6'

The only result i get so far is php5.3 was somehow installed after sudo apt-get install php5, but this is not what i'm looking for.

Also after command 'sudo add-apt-repository ppa:ondrej/php' i'm getting something like this:

E: The repository 'http://ppa.launchpad.net/ondrej/apache2/ubuntu eoan Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Could somebody help with this problem?

  • 1
    Possible duplicate of What can I do if a repository/PPA does not have a Release file?
    – nobody
    Commented Oct 25, 2019 at 11:42
  • Seems to me ondrej is having problems releasing packages for ubuntu 19.10 ... I have the same issue trying to install old php5.6 ... and looking here you can see the packages for php failed to build .... for now at least. I'm not sure why you had problems with other ppa repositories but as far as I can see the issue is not machine related. Commented Oct 28, 2019 at 19:42

2 Answers 2


Finally, after 10+ hours i found out that my version of ubuntu doesn't work with Software Center properly, and for some reason couldn't use any ppa, not only ppa:ondrej/php. After installing Ubuntu 18.04.3 LTS (Bionic Beaver) everything starts working without any additional commands.

So my advice for those who struggle with simillar problem, before installing ppa, learn what ppa is, then:

  1. sudo apt-get upgrade

  2. sudo apt-cache search php | wc -l #in my case it was php, you could ask for any other package, this command will show how much packages available till now

  3. sudo add-apt-repository ppa:ondrej/php #it could be any oher repository

  4. sudo apt-get update

  5. sudo apt-cache search php | wc -l #if number is the same as after second step, it means that you probably have the same problems as i had.

Sorry for poor english, try to do my best.

  • Omg thank you for this!! I was toiling with the standard Ubuntu 14 and 16 docker images for at least 10 hours, including one night until 5am, urgh. There are a thousand pages on installing php5.6 on Ubuntu, but none of them work anymore because of this problem you point out. There must be a lot of people experiencing this right now, since Heroku just killed php5.6 on their platform. Wish this page was more prominent – the only way i found it was by randomly googling ubuntu "Note, selecting 'php5.6-json' for regex 'php5.6'" Commented Jun 25, 2021 at 12:03
  • Isn't Ubuntu 19.10 depreciated already? If it is then the packages for php5.6 won't be abailable now. Try switching to 18.04 or 20.04 Ubuntu first. Commented Jun 25, 2021 at 13:53

Apparently ondrej only takes in supported php versions and so which means that php5.6 which have been unsupported recently has been opt out of his repository.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .