Score:4

unable to install php8.1 on 18.04

cn flag

I have 18.04 on a virtual machine. i want to update to php8.1

I already have the PPA php repository on the machine: sudo add-apt-repository ppa:ondrej/php

i can see that there is a file in:

# ls -l /var/lib/apt/lists/ppa.launchpad.net_on*
-rw-r--r-- 1 root root 20811 Jun 15 21:41 /var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_bionic_InRelease

i have tried:

root@prod:~# apt clean
root@prod:~# apt update
Hit:1 http://mirror.binarylane.com.au/ubuntu bionic InRelease
Hit:2 http://mirror.binarylane.com.au/ubuntu bionic-updates InRelease
Hit:3 http://mirror.binarylane.com.au/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:6 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:7 http://ppa.launchpad.net/maxmind/ppa/ubuntu bionic InRelease
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Fetched 88.7 kB in 2s (46.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

but when i enter the expected command to install php it doesn't work.

root@prod:~# apt install php8.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php8.1-mysql' for regex 'php8.1'
Note, selecting 'php8.1-gettext' for regex 'php8.1'
Note, selecting 'php8.1-common' for regex 'php8.1'
Note, selecting 'php8.1-imagick' for regex 'php8.1'
Note, selecting 'php8.1-calendar' for regex 'php8.1'
Note, selecting 'php8.1-fileinfo' for regex 'php8.1'
Note, selecting 'php8.1-exif' for regex 'php8.1'
Note, selecting 'php8.1-posix' for regex 'php8.1'
Note, selecting 'php8.1-iconv' for regex 'php8.1'
Note, selecting 'php8.1-sockets' for regex 'php8.1'
Note, selecting 'php8.1-mysqli' for regex 'php8.1'
Note, selecting 'php8.1-sysvmsg' for regex 'php8.1'
Note, selecting 'php8.1-pdo-mysql' for regex 'php8.1'
Note, selecting 'php8.1-mbstring' for regex 'php8.1'
Note, selecting 'php8.1-readline' for regex 'php8.1'
Note, selecting 'php8.1-opcache' for regex 'php8.1'
Note, selecting 'php8.1-sysvsem' for regex 'php8.1'
Note, selecting 'php8.1-sysvshm' for regex 'php8.1'
Note, selecting 'php8.1-tokenizer' for regex 'php8.1'
Note, selecting 'php8.1-cli' for regex 'php8.1'
Note, selecting 'php8.1-shmop' for regex 'php8.1'
Note, selecting 'php8.1-ffi' for regex 'php8.1'
Note, selecting 'php8.1-ftp' for regex 'php8.1'
Note, selecting 'php8.1-ctype' for regex 'php8.1'
Note, selecting 'php8.1-json' for regex 'php8.1'
Note, selecting 'php8.1-phar' for regex 'php8.1'
Note, selecting 'php8.1-mysqlnd' for regex 'php8.1'
Note, selecting 'libapache2-mod-php8.1' for regex 'php8.1'
Note, selecting 'php8.1-pdo' for regex 'php8.1'
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

when i search for installable php8.1 i get nothing, but 7.4 which is currently installed is there:

root@prod:~# apt-cache search php8.1
root@prod:~# apt-cache search php7.4
php7.4-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.4-common - documentation, examples and common module for PHP
libapache2-mod-php7.4 - server-side, HTML-embedded scripting language (Apache 2 module)
php7.4-opcache - Zend OpCache module for PHP
php7.4-zip - Zip module for PHP
php7.4-bz2 - bzip2 module for PHP
php7.4-soap - SOAP module for PHP
php7.4-ldap - LDAP module for PHP
php7.4-cli - command-line interpreter for the PHP scripting language
php7.4-gd - GD module for PHP
php7.4 - server-side, HTML-embedded scripting language (metapackage)
php7.4-mysql - MySQL module for PHP
php7.4-imap - IMAP module for PHP
php7.4-mbstring - MBSTRING module for PHP
php7.4-curl - CURL module for PHP
php7.4-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.4-gmp - GMP module for PHP
php7.4-readline - readline module for PHP
php7.4-intl - Internationalisation module for PHP
php7.4-xmlrpc - XMLRPC-EPI module for PHP
php7.4-xml - DOM, SimpleXML, XML, and XSL module for PHP
php7.4-json - JSON module for PHP

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
guiverc avatar
cn flag
[Ubuntu 18.04 LTS has reached the end of it's *standard* support life](https://fridge.ubuntu.com/2023/05/13/extended-security-maintenance-for-ubuntu-18-04-bionic-beaver-begins-31-may-2023/) thus is now off-topic here unless your question is specific to helping you move to a supported release of Ubuntu. Ubuntu 18.04 ESM support is available, but not on-topic here, see https://askubuntu.com/help/on-topic See also https://ubuntu.com//blog/18-04-end-of-standard-support
guiverc avatar
cn flag
A number of PPAs only provide support for *supported* releases; the PPA you specifically mentions covers all *standard* support LTS releases, which currently is 20.04 & newer. Ubuntu 18.04 LTS is now in ESM support with its *standard* support ended after 5 years.
Score:7
in flag

Support for Ubuntu 18.04 was removed from Ondřej Surý's PPA on June 15, 2023 as that version of Ubuntu is no longer supported. As per the description on the PPA landing page:

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

If you really must use PHP 8.1 on an Ubuntu 18.04 server, then your only semi-supported way forward would be to use Docker containers. However, if Docker is no longer making their tools available for 18.04, then you'll need to consider updating from 18.04 to something newer.

I sit in a Tesla and translated this thread with Ai:

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.