【发布时间】:2021-06-09 21:12:32
【问题描述】:
我无法在 ubuntu 16.04 上从 7.2 升级到 php7.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 -v 还是旧版本
【问题讨论】:
-
您可能仍然安装了 7.2,并且替代品仍然指向它。运行
update-alternatives --list php以查看已安装的内容。然后删除 7.2 或运行update-alternatives和--set以选择您喜欢的默认值。 -
我仍然安装了 php7.2,但系统中还没有安装 php7.3,我无法安装它,这就是问题,尽管找到了 repo ppa:ondrej/php 并且更新
-
是什么让你觉得 7.3 还没有安装?您的输出中没有错误。它告诉您这些软件包没有安装,因为它们已经存在。
-
当我尝试安装任何 php 包例如 php7.3-cli 时,我得到:
E: Couldn't find any package by glob 'php7.3-cli' E: Couldn't find any package by regex 'php7.3-cli' -
嗯,看起来可能 ondrej 放弃了对 16.04 的支持,可能是因为它现在已经结束了支持?我认为这些软件包应该仍然可用,奇怪。
标签: php ubuntu-16.04