2011-12-08 100 views
21

我尝试安装xdebug,但收到关于'phpize'的错误消息。 我该如何解决这个问题?phpize将无法在Mac OS X Lion上运行

leny:~ nick$ sudo pecl install xdebug 
Password: 
downloading xdebug-2.1.2.tgz ... 
Starting to download xdebug-2.1.2.tgz (304,229 bytes) 
............done: 304,229 bytes 
66 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20090626 
Zend Module Api No:  20090626 
Zend Extension Api No: 220090626 
Cannot find autoconf. Please check your autoconf installation and the 
$PHP_AUTOCONF environment variable. Then, rerun this script. 

ERROR: `phpize' failed 
+0

我也碰到了这个问题。我安装了autoconf,并将其添加到我的bash配置文件的路径中,但仍然收到此消息。不确定安装autoconf与它有什么关系。 – jenlampton

回答

26

“无法找到autoconf” - 安装autoconf并重试。

sudo port install autoconf但据我所知,您需要Xcode和MacPorts。

+0

谢谢你的快速响应。我是这个领域的中午,但是如何安装autoconf?谢谢! – directory

+0

我刚刚更新了我的答案 –

+0

是的,我用Xcode完成了!非常感谢你=) – directory

72

您也可以通过自制软件安装autoconf。只要运行

brew install autoconf 

,一切都会正常工作

+1

从这里得到权限错误。首先需要:* sudo chown -R yourusername/usr/local *然后:* sudo chmod -R u + w/usr/local *,最后:* brew link autoconf * – mpemburn

+0

这对我有很大的帮助。谢谢! – Rick

+0

谢谢!!!!!!!!!! –

1

对于我来说,我没有同意的Xcode许可证: -

$ sudo /usr/bin/m4 --version 


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode. 

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf' 

IMPORTANT: BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE FOLLOWING APPLE TERMS: