2013-05-19 230 views
0

當我運行在終端問題與Mac OS上安裝php54 X

brew install php54命令
brew install php54 
==> Downloading http://www.php.net/get/php-5.4.15.tar.bz2/from/this/mirror 
Already downloaded: /Library/Caches/Homebrew/php54-5.4.15 
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.15 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/ 
If configure fails try --with-vpx-dir=<DIR> 
checking for png_write_image in -lpng... yes 
If configure fails try --with-xpm-dir=<DIR> 
checking for FT_New_Face in -lfreetype... yes 
configure: error: GD build test failed. Please check the config.log for details. 
Error: uncaught throw `Failed executing: ./configure --prefix=/usr/local/Cellar/php54/5.4.15 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/opt/zlib --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/opt/freetype --with-jpeg-dir=/usr/local/opt/jpeg --with-png-dir=/usr/local/opt/libpng --with-gettext=/usr/local/opt/gettext --with-snmp=/usr --with-libedit --mandir=/usr/local/Cellar/php54/5.4.15/share/man --with-mhash --with-curl --with-bz2=/usr --disable-debug --with-openssl=/usr --enable-fpm - 
Please report this bug: 
    https://github.com/mxcl/homebrew/wiki/troubleshooting 
/usr/local/Library/Formula/abstract-php.rb:127:in `throw' 
/usr/local/Library/Formula/abstract-php.rb:127:in `install' 
/usr/local/Library/Homebrew/build.rb:142:in `install' 
/usr/local/Library/Homebrew/formula.rb:265:in `brew' 
/usr/local/Library/Homebrew/formula.rb:651:in `stage' 
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in `mktemp' 
/usr/local/Library/Homebrew/formula.rb:647:in `stage' 
/usr/local/Library/Homebrew/formula.rb:260:in `brew' 
/usr/local/Library/Homebrew/build.rb:121:in `install' 
/usr/local/Library/Homebrew/build.rb:43:in `main' 
/usr/local/Library/Homebrew/build.rb:12 
/usr/local/Library/Formula/php54.rb:27 

Here is the configure file

brew doctor是乾淨

隨着我有同樣的問題

+0

爲什麼你不能獲得MAMP? – Sam

+0

我不想使用它 – achempion

+0

您是否按要求報告錯誤? –

回答

0

我類似的問題。據之前

brew install php53 

這指向正確的zlib版本路徑(由釀造安裝,但不能與Mac OS X的分佈)解決通過執行

export LDFLAGS=/usr/local/opt/zlib/lib && export CPPFLAGS=/usr/local/opt/zlib/include 

。基於來自zlib的警告:

這個公式是桶只有:所以它沒有符號鏈接到/ usr/local。

Mac OS X已經提供了此軟件並安裝在 並行的另一個版本可能會導致各種麻煩。

通常這對你沒有任何後果。如果你建立你自己的 軟件,它需要這個公式,你需要添加到您的 生成變量:

LDFLAGS: -L/usr/local/opt/zlib/lib 
CPPFLAGS: -I/usr/local/opt/zlib/include 
+0

看起來像真相 – achempion

1

只是運行brew link zlib --force