【发布时间】:2021-01-20 15:18:45
【问题描述】:
我正在尝试在我的 Mac 上安装 Xdebug,因为我正在使用 MAMP 进行本地开发。
我尝试使用pecl 在终端中运行以下命令来安装 Xdebug:
sudo pecl install xdebug
但是会发生以下情况:
hello-world:~ lois$ sudo pecl install xdebug
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading xdebug-2.9.8.tgz ...
Starting to download xdebug-2.9.8.tgz (245,293 bytes)
...................................................done: 245,293 bytes
91 source files, building
running: phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
autom4te: need GNU m4 1.4 or later: /usr/bin/m4
ERROR: `phpize' failed
看起来 phpize 试图定位一些不存在的文件,然后失败了。
xdebug 安装页面中没有提到这些文件,所以我不确定我做错了什么。
【问题讨论】:
-
你安装了 phpize / php-dev 等吗? stackoverflow.com/questions/3108937/…
-
堆栈跟踪表明 phpize 实际上正在运行。但它失败了
-
你有没有像错误信息告诉你的那样
pecl channel-update pecl.php.net -
@RiggsFolly 是的,但发生了完全相同的错误