brew install php55-intl失败,无法安装Composer

时间:2014-08-05 21:57:32

标签: php macos npm homebrew

我试图安装npm install&&咕噜声,但它告诉我,我需要作曲家。我试图安装作曲家,但这依赖于php55。

我已经尝试过brew install php55,php55-intl,php56,php56-intl等。

我正在阅读此处的说明:https://getcomposer.org/doc/00-intro.md

它声明对于Mac我应该只使用brew命令:

  

brew update brew tap   自制/自制的PHP   brew tap homebrew / dupes   brew tap自制软件/版本   brew安装php55-intl #fails在这里   brew install homebrew / php / composer

我收到以下错误:

  

brew install php55-intl   ==>安装php55-intl的依赖项:php55,icu4c   ==>安装php55-intl依赖:php55   ==>正在下载http://www.php.net/get/php-5.5.15.tar.bz2/from/this/mirror   下载:/ Library/Caches/Homebrew/php55-5.5.15   ==> ./configure --prefix = / usr / local / Cellar / php55 / 5.5.15 --localstatedir = / usr / local / var --sysconfdir = / usr / local / etc / php / 5.5 --with-config-file -path = / usr / local / etc / php / 5.5 --with-config-file-scan-dir = / usr / local / etc / php / 5.5 / conf.d - 在-lpng中检查png_write_image ...是如果配置失败尝试   --with-xpm-dir =检查fabsf ...是检查floorf ... yes configure:错误:GD build test failed。请检查   config.log了解详情。

     

请阅读:https://github.com/Homebrew/homebrew/wiki/troubleshooting   如果报告此问题,请在(不是Homebrew / homebrew)这样做:
  https://github.com/homebrew/homebrew-php/issues

     

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in   require': Class is not a module (TypeError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 需要&#39;从   /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:390:in   <class:HTTP>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:384:in &#39;从   /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:25:in   <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 需要&#39;从   /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in   require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/https.rb:21:in &#39;从   /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in   require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 需要&#39;来自/usr/local/Library/Homebrew/utils.rb:308:open' from /usr/local/Library/Homebrew/utils.rb:350:in issues_matching&#39;     来自/usr/local/Library/Homebrew/utils.rb:378:in issues_for_formula' from /usr/local/Library/Homebrew/exceptions.rb:171:in fetch_issues&#39;     来自/usr/local/Library/Homebrew/exceptions.rb:167:in issues' from /usr/local/Library/Homebrew/exceptions.rb:207:in dump&#39;从   /usr/local/Library/brew.rb:158:in rescue in <main>' from /usr/local/Library/brew.rb:66:in&#39;

有谁知道另一项工作?我尝试过curl命令,但它们从不运行,我无法在我的mac上运行exe。

谢谢!

1 个答案:

答案 0 :(得分:12)

解决方案:

  • 升级到最新版本的XCode
  • 确保重新安装XCode CLT:xcode-select --install
  • 更新您的公式:brew update
  • 删除zlib:brew rm zlib
  • 安装/重新安装php55:brew install php55(因为zlib是一个依赖项,它将被重新安装)

后跟brew install composer

在此处找到:https://github.com/Homebrew/homebrew-php/issues/610

我需要更新我的Xcode,然后一切都运行了。