簡體   English   中英

嘗試安裝pecl擴展時,mac os x 10.7.3上的$ PHP_AUTOCONF錯誤

[英]$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

我正在嘗試使用pecl_http和memcache設置我的機器,在這兩種情況下,我都會遇到類似的錯誤。 這是在MAC OS X 10.7.3(獅子)上,我也安裝了XCODE。 我還在運行這些命令之前安裝了Zend Server社區版,並設置了CFLAGS =' - arch i386 -arch x86_64'環境變量。 所以請幫助我做我需要做的事情

bash-3.2# **sudo pecl install pecl_http-1.7.1**
downloading pecl_http-1.7.1.tgz ...
Starting to download pecl_http-1.7.1.tgz (174,098 bytes)
.....................................done: 174,098 bytes
71 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
brew install autoconf

更簡單的解決方案

您需要安裝autoconfig。 我通常喜歡從源代碼安裝庫。 所以你可以做到以下幾點:

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install

我和山獅一起經歷了這個。

在Mac OS X 10.8上的情況略有不同。 來自Bob Spryn的高度投票解決方案不起作用,因為它不會創建符號鏈接,所以在安裝autoconf你應該制作它們:

sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoconf /usr/bin/autoconf
sudo ln -s /usr/local/Cellar/autoconf/2.69/bin/autoheader /usr/bin/autoheader

我知道這個問題適用於10.7,但我希望我的答案對於10.8的人有用。 :)

更新:也適用於10.10 Yosemite。

要么

sudo port install autoconf

如果你使用macports

XCODE 4.3沒有將所有autoconf等工具放在Developer文件夾中。 它甚至沒有在MACINTOSH HD中創建該文件夾。 我不得不降級到XCODE 4.2.1,它在Developer文件夾中安裝了你需要的所有內容,現在我沒有看到任何錯誤。

這里也是一個有用的參考

也許你需要鏈接autoconf與brew link autoconf

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM