2

I would like to upgrade our production php version to new php7. Unfortunately we are currently running on ubuntu 12.04. I have already tried to install php7 on corresponding virtual machine using ppa:ondrej/php repository. It results with:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php7.0-fpm
E: Couldn't find any package by regex 'php7.0-fpm'

Is there a way to use new php7 features without upgrading our production environment? I am currently trying to compile it from source, but as I am not experienced with it I am not quite sure about its result.

Thank you in advance.

2 Answers2

1

PHP 7 is not available in the Ubuntu 12.04 (Precise) official repositories, but you may be able to add it from a PPA following a guide like this one from DigitalOcean (though the DO one is for 14.04, so you'll have to adapt it a bit).

Notice that the Ubuntu Developers maintained PPA for PHP 7.0 is only available for Xenial and Yakkety.

  • Anybody got this to work? I added the PPA (had to first install python-software-properties), ran apt-get update (and ...upgrade and ...dist-upgrade), and had no errors - but no php7* package are available! – TheStoryCoder Aug 28 '20 at 06:13
0

Looks like you missed apt-get update. When it runs, check whether it actually contacts launchpad for this PPA.

FGM
  • 101
  • Can you expand your answer please? –  Aug 13 '16 at 07:09
  • 1
    Once you add a PPA, it's like with any other APT source: you need to run apt-get update before the package becomes installable with apt-get install – FGM Aug 13 '16 at 07:56