Mac安装xdebug运行phpize时会报错

/usr/bin/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

1. 下载xdebug

2.打开终端 cd xdebug-2.2.x 切换到你解压出来的目录中

3. 执行 phpize: phpize

4. ./configure --enable-xdebug

5. 执行编译命令 make

6. 拷贝扩展到你想要的目录中 cp modules/xdebug.so /放置扩展的路径/xdebug.so
7. 在 php.ini 中添加下列文件使xdebug扩展生效(Mac OS X下web开发常用文件所在目录)

zend_extension="/放置扩展的路径/xdebug.so"

;xdebug默认远程调试是关闭的,加上这个打开,要不没法调试
[xdebug]
xdebug.remote_enable=On

8. 重启apache(Mac OS X下重启apache)追问

我就是卡在第三步了,phpize --help出来的路径执行也不行,就报错

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网