$ brew install php71
#省略
Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php.rb:648:in `plist'
Please report this to the homebrew/php tap!
#省略
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
You can try again using:
brew link php71
#省略

ComposerとMySQLとApacheと

$ brew install homebrew/php/composer
#省略
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/composer
Target /usr/local/bin/composer
already exists. You may want to remove it:
rm '/usr/local/bin/composer'
To force the link and overwrite all conflicting files:
brew link --overwrite composer
To list all files that would be deleted:
brew link --overwrite --dry-run composer
Possible conflicting files are:
/usr/local/bin/composer
==> Caveats
composer no longer depends on the homebrew php Formulas since the last couple of macOS releases
contains a php version compatible with composer. If this has been part of your workflow
previously then please make the appropriate changes and `brew install php71` or other appropriate
Homebrew PHP version.
==> Summary
🍺 /usr/local/Cellar/composer/1.6.2: 5 files, 1.8MB
$ cd /usr/local/bin
$ rm '/usr/local/bin/composer' #エラーメッセージに従い、削除する。
$ brew link #ここでも怒られた。
brew ln, link [--overwrite] [--dry-run] [--force] formula:
Symlink all of formula's installed files into the Homebrew prefix. This
is done automatically when you install formulae but can be useful for DIY
installations.
If --overwrite is passed, Homebrew will delete files which already exist in
the prefix while linking.
If --dry-run or -n is passed, Homebrew will list all files which would
be linked or which would be deleted by brew link --overwrite, but will not
actually link or delete any files.
If --force (or -f) is passed, Homebrew will allow keg-only formulae to be linked.
Error: Invalid usage: This command requires a keg argument
$ brew doctor #brew doctorの方がエラーメッセージが簡潔な気がする・・・
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
composer
$ brew unlink composer
$ brew prune
$ brew install homebrew/php/composer #再チャレンジ
$ brew doctor
Your system is ready to brew.