Score:1

Can I install php8.0 on Ubutnu 16.04

cn flag

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'
Score:1
mg flag

Xenial (Ubuntu 16) is only in standard support until 2021. After that, there is only extended security-only support. Which means your server is 'on life support' so to speak.

So extended-security support is meant to keep a server alive, not to update it with new features and new software.

Extended security support (ESM, or maybe called Ubuntu Pro these days) is a sort of 'paid for' support option. You can get it free for a limited number of installations, though. But it clearly 'is not for everyone'.

Ondrej (the maintainer of that PPA repository with PHP versions for Ubuntu) does not want to support versions that are outside standard support, which sounds perfectly fine by the way.

So you can't download any Xenial packages anymore, because he removed them. Maybe someone still has a Xenial server running with his php8.0 packages on there, but those packages will not be updated, so you are just as safe as to compile your own version from source if you need to run it.

These are the negatives about opting in for extended support programs. Yes, you receive security updates for something that would otherwise be out of life. But you should not think that your server is then 'just fine the way it is' with ESM. All around the Ubuntu community and other commercial packages, you will see Xenial support being dropped, even if you still have ESM for years to come.

So use ESM only as a means to postpone an upgrade if you really have to, but do not let it stick around it for years.

Score:1
cz flag

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.

blond_viper avatar
cn flag
thank you for the answer, I wanted to have it clear.
in flag
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.
cn flag
@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)
Yoann Pageaud avatar
ph flag
@Crimbo Hi, could you describe what you precisely enabled in the ESM to get PHP in Ubuntu 16.04 ?? I am using Ubuntu 16.04 and really need to upgrade PHP to the most recent version possible. Thank you in advance for your answer ;) !
cn flag
@YoannPageaud It looks like they have changed it since I enabled ESM. ESM is now a part of Ubuntu Pro, which you have to sign up to https://ubuntu.com/pro. Once you have signed up, you then [attach your subscription](https://ubuntu.com/server/docs/install/subscription)
Yoann Pageaud avatar
ph flag
@Crimbo I believe I did that already (a year ago or so), since activation of the ESM can be done using the *Register for personnal use* option. Maybe the "Pro" option is more complete but I doubt that. Anyway, I have found a ppa to get PHP 7.4 on Ubuntu 16.04, event though it's pretty late. 7.4 is good enough for now for me: `ppa:jczaplicki/xenial-php74-temp`
cn flag
Ar ok. Well my ESM seemed to stop working, I guess when they merged it with Ubuntu Pro
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.