ひよこメモ

備忘ブログ Ruby, Rails, AWS, html5, css3, javascript, vim,

HomeBrewでPHPのComposerインストールがうまくいかない

$ brew install homebrew/php/composer
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 10817, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 10817 (delta 11), reused 0 (delta 0), pack-reused 10792
Receiving objects: 100% (10817/10817), 2.21 MiB | 518.00 KiB/s, done.
Resolving deltas: 100% (7369/7369), done.
Checking connectivity... done.
Tapped 502 formulae
==> Installing composer from homebrew/homebrew-php
Error: undefined method `desc' for Formulary::Formulae::Php70:Class
Please report this bug:
    https://git.io/brew-troubleshooting
以下略

Error: undefined method `desc' for Formulary - When installing mcrypt for php55 · Issue #41762 · Homebrew/homebrew · GitHub

HomeBrewをupdateすればいけそう


update後にここと全く同じ現象

MacにHomebrewでComposerをインストールしました - Qiita

$ brew install php56
を実行してPHPをインストール
(カナーリ長い)


一旦ターミナルを閉じる

再度開き、Composerインストール

$ brew install homebrew/php/composer
==> Installing composer from homebrew/homebrew-php
==> Downloading http://getcomposer.org/download/1.0.0-alpha10/composer.phar
######################################################################## 100.0%
==> Caveats
Verify your installation by running:
  "composer --version".

You can read more about composer and packagist by running:
  "brew home composer".
==> Summary
🍺  /usr/local/Cellar/composer/1.0.0-alpha10: 3 files, 1.0M, built in 10 seconds

Composerのインストール完了!