我的系统上有:
$ php --version
PHP 7.4.2 (cli) (built: Feb 1 2020 17:49:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
当尝试安装时php-xdebug
,我只得到 php8 版本:
$ sudo apt-get install php-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
php8.0-common php8.0-xdebug
The following NEW packages will be installed:
php-xdebug php8.0-common php8.0-xdebug
0 upgraded, 3 newly installed, 0 to remove and 200 not upgraded.
Need to get 0 B/1.507 kB of archives.
After this operation, 10,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
但是,我已经安装了 php 7.4 版本,因此需要它。如您所见,xdebug
尚未安装php --version
。
关于如何为 php 7.4 具体安装它的任何建议
我非常感谢您的回复!
答案1
我一直在寻找解决方案,最后找到了 Ondřej Surý 的 PPA,您可以使用它进行安装:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4-xdebug
这对我来说很有效,
希望这可以帮助。