
###1、 采用pecl安装(xdebug官网推荐)
1 |
pecl install xdebug-2.6.0 |
###2、 pecl: command not found Mac
本地无pecl,需下载安装
-
下载
1
2curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar -
安装
1、Type 1 and press return.
2、Enter:
/usr/local/pear
3、Type 4 and press return.
4、Enter:
/usr/local/bin
5、Press return
###3、 安装xdebug-2.6.0
1 |
sudo pecl install xdebug-2.6.0 |
报错: fatal error: ‘php.h’ file not found
原因: 缺少php.h 创建软连接
解决办法:通过Xcode创建软链接
1 |
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include /usr/include |
###4、安装成功




近期评论