I'm trying to install php 5.6 on our Ubuntu 14.04.1 LTS server, I've already added ppa:ondrej/php repository and executed:

apt-get update

I ran apt-get install php5.6 and got this result:

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'

Does this mean that php 5.6 is no longer available? Is there any other way that I can install php 5.6?

Thanks in advance!

closed as off-topic by mook765, karel, Eric Carvalho, N0rbert, Jim May 9 at 2:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


TL;DR: You can't install php5.6 on 14.04, consider upgrade releases.

Php 5.6 is still available on Ondrej's repository.

:~$ apt-cache policy php5.6
  Installed: 5.6.40-6+ubuntu18.04.1+deb.sury.org+3
  Candidate: 5.6.40-7+ubuntu18.04.1+deb.sury.org+1
  Version table:
     5.6.40-7+ubuntu18.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main i386 Packages
 *** 5.6.40-6+ubuntu18.04.1+deb.sury.org+3 100
        100 /var/lib/dpkg/status

The problem is you're using Ubuntu 14.04 which has reached End Of Life, it is recommended that you update to newer version.

The ppa maintainer has dropped support for Ubuntu 14.04, the supported releases is as follow:

  • Ubuntu 16.04 Xenial
  • Ubuntu 18.04 Bionic
  • Ubuntu 18.10 Cosmic
  • Ubuntu 19.04 Disco

You have to upgrade/fresh install above version of Ubuntu to get php5.6 working.

I think you'd want to upgrade to Xenial since it doesn't require any fresh installing method and can be upgraded directly.

Related How to install software or upgrade from an old unsupported release?

  • Is there any other alternative? We can't upgrade our Ubuntu version yet. Thanks. – kerminaxcx May 8 at 7:06
  • 1
    @kerminaxcx You can compile PHP from source, to find your desired php5.6 version visit this php.net/releases. – Jim May 8 at 7:16
  • An alternative is to use other PPA - launchpad.net/~jason.grammenos.agility/+archive/ubuntu/… , but better is to upgrade to supported 16.04 LTS release. – N0rbert May 8 at 19:06
  • Hi @N0rbert, I've tried your suggestion but failed to install. I've got: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. So maybe this means that we can't install from this source as well? – kerminaxcx May 9 at 2:05
  • 2
    @kerminaxcx That'd probably the case, it is really recommended for you to upgrade to 16.04 or go through always work solution— installing from the source. – Jim May 9 at 3:25

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