由于没有匹配的软件包,无法将PHP升级到7.3。

3

我无法从Ubuntu 16.04将PHP版本从7.2升级到7.3,我运行了以下命令:

sudo apt-get install python-software-properties
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.3

随后出现以下输出:

Building dependency tree       
Reading state information... Done
Note, selecting 'php7.3-mongodb' for regex 'php7.3'
Note, selecting 'php7.3-memcached' for regex 'php7.3'
Note, selecting 'php7.3-msgpack' for regex 'php7.3'
Note, selecting 'php7.3-igbinary' for regex 'php7.3'
Note, selecting 'php7.3-uploadprogress' for regex 'php7.3'
Note, selecting 'php-uploadprogress' instead of 'php7.3-uploadprogress'
php7.3-msgpack is already the newest version (2.1.1+0.5.7-2+ubuntu16.04.1+deb.sury.org+4).
php7.3-mongodb is already the newest version (1.8.1-2+ubuntu16.04.1+deb.sury.org+4).
php7.3-memcached is already the newest version (3.1.5+2.2.0-4+ubuntu16.04.1+deb.sury.org+4).
php-uploadprogress is already the newest version (1.0.3.1-4-g95d8a0f-5+ubuntu16.04.1+deb.sury.org+10).
php7.3-igbinary is already the newest version (3.1.6+2.0.8-2+ubuntu16.04.1+deb.sury.org+4).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

PHP版本依然是旧版本


1
你可能仍然安装了7.2版本,并且alternatives仍然指向它。运行update-alternatives --list php查看已安装的内容。然后删除7.2或使用--set选项运行update-alternatives以选择您首选的默认版本。 - Alex Howansky
你为什么认为7.3还没有安装?你的输出中没有错误。它告诉你这些软件包没有被安装,因为它们已经存在了。 - Alex Howansky
当我尝试安装任何PHP包例如php7.3-cli时,我得到以下信息:E: 无法通过正则表达式匹配找到任何软件包 'php7.3-cli'``` - Sabreen Salama
哦,看起来ondrej可能停止支持16.04了,可能是因为它已经过了支持结束时间?不过我认为软件包仍然应该可用,这很奇怪。 - Alex Howansky
这个 PPA 文件(http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/main/binary-amd64/Packages.gz) 几乎是空的,而且最近几天都没有更新。可能是打包时出现了错误。 - Alex Howansky
显示剩余2条评论
1个回答

8

Ondřej在几天前停止支持16.04版:

目前,所有适用于Ubuntu 16.04 LTS (Xenial)的软件包已从仓库中删除。

这就解释了为什么上周它能正常工作,但今天却不能工作。


软件源仓库在Ubuntu 18或20上是否仍然可用? - Sabreen Salama
我认为是这样的 - 公告只提到了16.04,其他仓库文件也没有空。 (虽然我最近没有尝试过安装。) - Alex Howansky

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接