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

Posted

技术标签:

【中文标题】brew install php55-intl 失败,无法安装 Composer【英文标题】:brew install php55-intl fails, Cant Install Composer 【发布时间】:2014-09-28 17:14:31 【问题描述】:

我正在尝试安装 npm install && grunt,但是它告诉我需要 composer。我正在尝试安装作曲家,但这取决于 php55。

我试过 brew install php55、php55-intl、php56、php56-intl 等

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

它指出对于 Mac,我应该简单地使用 brew 命令:

酿造更新酿造水龙头 自制/自制-php brew tap homebrew/dupes brew tap 自制软件/版本 brew install php55-intl #fails here 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... 是 配置:错误:GD 构建测试失败。请检查 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 require' 来自 /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 ' 来自 /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 require' 来自 /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 ' 来自 /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 require' 来自 /usr/local/Library/Homebrew/utils.rb:308:in open' from /usr/local/Library/Homebrew/utils.rb:350:inissues_matching' 来自 /usr/local/Library/Homebrew/utils.rb:378:in issues_for_formula' from /usr/local/Library/Homebrew/exceptions.rb:171:infetch_issues' 来自 /usr/local/Library/Homebrew/exceptions.rb:167:in issues' from /usr/local/Library/Homebrew/exceptions.rb:207:indump' 来自 /usr/local/Library/brew.rb:158:in rescue in <main>' from /usr/local/Library/brew.rb:66:in'

有人知道另一种解决方法吗?我尝试过 curl 命令,但它们从未运行,我无法在我的 mac 上运行 exe。

谢谢!

【问题讨论】:

如果你没有使用 brew 来安装你的 PHP 版本,你可以不使用 brew 安装 composer。下载 .phar 并将其移动到 /usr/local/bin @lsouza 这也很好用,谢谢 【参考方案1】:

解决方案:

升级到最新版本的 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,然后一切都运行了。

【讨论】:

您可能也必须这样做:***.com/questions/16432071/…

以上是关于brew install php55-intl 失败,无法安装 Composer的主要内容,如果未能解决你的问题,请参考以下文章

brew install php7.1

mac brew install redis 报错

brew install php56-mongo 命令不起作用

Mac下通过 brew 安装 Apache 和 PHP

Mac上使用brew配置LNMP环境

brew安装php70出现configure: error: Cannot find libz 错误解决方法