Search code examples
phpubuntu-18.04php-8.2

Can't install PHP-FPM on Ubuntu 18.04


I can't install php8.2-fpm in Ubuntu 18, here are my commands to install:

sudo apt install lsb-release apt-transport-https ca-certificates software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2

Here is the response, including the error:

$ sudo apt-get install php8.2 php8.2-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php8.2
E: Couldn't find any package by glob 'php8.2'
E: Couldn't find any package by regex 'php8.2'
E: Unable to locate package php8.2-fpm
E: Couldn't find any package by glob 'php8.2-fpm'
E: Couldn't find any package by regex 'php8.2-fpm'

Why can't I install PHP-FPM on Ubuntu?


Solution

  • Ubuntu 18.04 (Bionic Beaver) is now no longer supported outside of paid extended support plans. Ondřej Surý's PHP packages are only available for supported versions of Ubuntu, so are no longer available for Ubuntu 18.04.

    This is also discussed in the FAQ for that repository, with details of why the files are immediately unavailable:

    But it's "just a file"...

    No, it's never "just a file". It's a security risk. Security issues are regularly found in PHP releases and any "just a file" might accumulate a wealth of them. That's OK, every software has bugs, and henceforth needs to be update on regular basis.

    It would be irresponsible to provide unmaintained packages just for "convenience". It would also create additional burden on the maintainer of this repository because instead of "why the packages are not available" this would just generate questions like "why the package are not updated".

    It's not "just a file".

    You will have to either pay for extended support, or update to a newer version of Ubuntu.