2011-12-08 45 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: