5

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!

Liso
  • 15,377
  • 3
  • 51
  • 80
kerminaxcx
  • 51
  • 1
  • 1
  • 2

1 Answers1

4

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
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?

Liso
  • 15,377
  • 3
  • 51
  • 80
  • 1
    Is there any other alternative? We can't upgrade our Ubuntu version yet. Thanks. – kerminaxcx May 08 '19 at 07:06
  • 1
    @kerminaxcx You can compile PHP from source, to find your desired php5.6 version visit this https://www.php.net/releases/. – Liso May 08 '19 at 07:16
  • An alternative is to use other PPA - https://launchpad.net/~jason.grammenos.agility/+archive/ubuntu/php?field.series_filter=trusty , but better is to upgrade to supported 16.04 LTS release. – N0rbert May 08 '19 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 09 '19 at 02: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. – Liso May 09 '19 at 03:25
  • It is definitely possible to install php5.6 on 14.04. – akronymn Oct 17 '19 at 14:19
  • @akronymn Hence my point up there— installing from the source. – Liso Mar 25 '21 at 02:02
  • @akronymn please ... tell use how !| I have 14.04 on an old VPS. I am using both PPA of ondrj (apache and php) and still I cannot install php5.6-fpm because no candidates – realtebo Jul 07 '23 at 08:44