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