1

I'm trying to install php8 on Ubuntu 16.04.5 LTS. Here is the list of commands and output that I ran:

apt-get update
apt install software-properties-common

--- these commands went fine when ran

add-apt-repository ppa:ondrej/php

output:

 Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa

You can get more information about the packages at https://deb.sury.org

IMPORTANT: The <foo>-backports is now required on older Ubuntu releases.

BUGS&FEATURES: This PPA now has a issue tracker:
https://deb.sury.org/#bug-reporting

CAVEATS:
1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
2. If you are using apache2, you are advised to add ppa:ondrej/apache2
3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
   or ppa:ondrej/nginx

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/

WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:

# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpw60tb7ap/secring.gpg' created
gpg: keyring `/tmp/tmpw60tb7ap/pubring.gpg' created
gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpw60tb7ap/trustdb.gpg: trustdb created
gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

apt update

output:

Hit:1 http://ppa.launchpad.net/nginx/stable/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease                                                                                                      
Hit:3 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease                                                                                                  
Hit:4 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                                         
Hit:5 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                       
Ign:6 https://packages.sury.org/php xenial InRelease                                                                                                  
Err:7 https://packages.sury.org/php xenial Release                                                                              
  404  Not Found
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]                         
Hit:9 http://repo.zabbix.com/zabbix/3.4/ubuntu xenial InRelease                                    
Hit:10 https://packagecloud.io/phalcon/stable/ubuntu xenial InRelease              
Reading package lists... Done 
E: The repository 'https://packages.sury.org/php xenial 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.

After that while, I tried to install php8.0-fpm I got the following:

apt install php8-fpm

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php8-fpm

Also:

apt install php8.0-fpm

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php8.0-fpm
E: Couldn't find any package by glob 'php8.0-fpm'
E: Couldn't find any package by regex 'php8.0-fpm'
blond_viper
  • 11
  • 1
  • 2

1 Answers1

1

They did explicitly warn you in the output you posted above:

Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.

You should not be running 16.04 as it has passed end of life. Upgrade first to a currently supported Ubuntu release, and then you will be able to install PHP 8.0.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • thank you for the answer, I wanted to have it clear. – blond_viper Jun 29 '21 at 12:05
  • 3
    Ubuntu 16.04 is a LTS release, official end-of-life is April 2026 ( as per https://wiki.ubuntu.com/Releases ) so it does not explain why php8.0 is not available for that specific release. – Ultraspider Mar 05 '22 at 14:21
  • @Ultraspider 100%. I've got php8.0 installed on my Ubuntu 16.04 server - I think due to applying for [ESM](https://ubuntu.com/security/esm) – Crimbo May 12 '22 at 09:42