pge*_*e70 4 php package-management apt 18.04
我的虚拟机是18.04。我想更新到php8.1
我的机器上已经有 PPA php 存储库:
sudo add-apt-repository ppa:ondrej/php
我可以看到有一个文件:
# 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
Run Code Online (Sandbox Code Playgroud)
我努力了:
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.
Run Code Online (Sandbox Code Playgroud)
但是当我输入预期的命令来安装 php 时它不起作用。
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.
Run Code Online (Sandbox Code Playgroud)
当我搜索可安装的 php8.1 时,我什么也没得到,但当前安装的 7.4 在那里:
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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
mat*_*igo 11
2023 年 6 月 15 日,Ond\xc5\x99ej Sur\xc3\xbd\ 的 PPA 中删除了对 Ubuntu 18.04 的支持,因为该版本的 Ubuntu 不再受支持。按照PPA 登陆页面上的描述:
\n\n\n...仅受支持的Ubuntu 版本 ( https://wiki.ubuntu.com/Releases ) 的 PHP 版本 ( http://php.net/supported-versions.php )提供不要要求终止生命的 PHP 版本或 Ubuntu 版本,它们不会被提供。
\n
如果您确实必须在 Ubuntu 18.04 服务器上使用 PHP 8.1,那么您唯一的半支持方法是使用 Docker 容器。但是,如果 Docker 不再为 18.04 提供其工具,那么您需要考虑从 18.04 更新到更新的版本。
\n