如果我运行phpize -v,我就会得到
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718如果我打开phpinfo,它会显示一个更新的日期。

所以我的手机已经过时了。
这是php -v的输出:
PHP 7.4.21 (cli) (built: Jul 1 2021 16:09:41) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies如果我创建一个php信息页面并显示它,那么它也会显示PHP版本7.4.21
我如何获得phpize的php 7.4?
发布于 2021-09-02 09:26:23
弄明白了。
首先我搜索了php7:
apt-cache search php7.4然后我找到php7.4-dev并安装了它:
sudo apt install php7.4-dev这个安装在/usr/bin中的phpize7.4
最后一步是使用以下方法将phpize设置为新版本:
sudo update-alternatives --set phpize /usr/bin/phpize7.4现在,phpize -v输出:
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902发布于 2022-12-23 10:21:00
您还可能需要更改./configure版本:
phpize8.1
./configure --with-php-config=/usr/bin/php-config8.1 [...]发布于 2023-03-13 01:07:21
要显示所有已安装的phpize版本,请执行以下操作:
sudo update-alternatives --config phpize您将看到phpize版本列表。
root@my-server:~# sudo update-alternatives --config phpize
There are 3 choices for the alternative phpize (providing /usr/bin/phpize).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/phpize.default 100 auto mode
1 /usr/bin/phpize.default 100 manual mode
2 /usr/bin/phpize8.1 81 manual mode
3 /usr/bin/phpize8.2 82 manual mode
Press <enter> to keep the current choice[*], or type selection number:命中所需号码。
https://unix.stackexchange.com/questions/667196
复制相似问题