我无法从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版本依然是旧版本
update-alternatives --list php
查看已安装的内容。然后删除7.2或使用--set
选项运行update-alternatives
以选择您首选的默认版本。 - Alex HowanskyE: 无法通过正则表达式匹配找到任何软件包 'php7.3-cli'```
- Sabreen Salama