PHP 7.2未安装,但显示在php -v上

我已经在树莓派上安装了PHP 7.3。当我在浏览器中使用phpinfo()时,实际上显示的是PHP 7.3。

但是当我在终端中使用php -v尝试时,它说的是PHP 7.2.24

我搜索了PHP 7.2的安装,但它不存在。


WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapache2-mod-php7.0/oldstable,now 7.0.33-0+deb9u6 armhf [installed,automatic]
libapache2-mod-php7.3/stable,now 7.3.11-1~deb10u1 armhf [installed]
php/oldstable,now 1:7.0+49 all [installed]
php-bz2/oldstable,now 1:7.0+49 all [installed,automatic]
php-common/oldstable,now 1:49 all [installed,automatic]
php-curl/stable,now 2:7.3+69 all [installed,automatic]
php-gd/oldstable,automatic]
php-mbstring/oldstable,automatic]
php-mysql/oldstable,automatic]
php-pear/oldstable,now 1:1.10.1+submodules+notgz-9+deb9u1 all [installed,automatic]
php-php-gettext/oldstable,stable,now 1.0.12-0.1 all [installed,automatic]
php-phpseclib/oldstable,now 2.0.4-1 all [installed,automatic]
php-tcpdf/oldstable,now 6.2.12+dfsg2-1 all [installed,automatic]
php-xml/oldstable,automatic]
php-zip/oldstable,automatic]
php7.0/oldstable,now 7.0.33-0+deb9u6 all [installed,automatic]
php7.0-bz2/oldstable,automatic]
php7.0-cli/oldstable,automatic]
php7.0-common/oldstable,automatic]
php7.0-gd/oldstable,automatic]
php7.0-json/oldstable,automatic]
php7.0-mbstring/oldstable,automatic]
php7.0-mysql/oldstable,automatic]
php7.0-opcache/oldstable,automatic]
php7.0-readline/oldstable,automatic]
php7.0-xml/oldstable,automatic]
php7.0-zip/oldstable,automatic]
php7.3/stable,now 7.3.11-1~deb10u1 all [installed]
php7.3-cli/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-common/stable,now 7.3.11-1~deb10u1 armhf [installed,automatic]
php7.3-curl/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-fpm/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-gd/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-json/stable,automatic]
php7.3-mbstring/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-opcache/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-readline/stable,automatic]
php7.3-xml/stable,now 7.3.11-1~deb10u1 armhf [installed]
php7.3-zip/stable,now 7.3.11-1~deb10u1 armhf [installed]
phpmyadmin/oldstable,now 4:4.6.6-4 all [installed]

通过搜索find / -name "*7.2*"我也找不到任何东西。

我怎么能说php -v必须改用7.3?

Shuzhenabc123 回答:PHP 7.2未安装,但显示在php -v上

检查是否可以执行php7.3

php可能基本上指向旧版本。

,

我通过重新安装apache解决了它。

,
sudo update-alternatives --set php /usr/bin/php7.3

sudo apt-get purge php7.2-common
本文链接:https://www.f2er.com/3095471.html

大家都在问