HomebrewでのXcodeライセンスの警告が出た話

f:id:tocguitar1:20170405144912j:plain

はじめに

そろそろzshを導入しようと思いまして、

MacbookAir様で使えるzshを確認しようとしたところ

エラーが出たんですわこれが


エラー

MacBook-Air:~ toshiyuki$ brew info zsh
Error: You have not agreed to the Xcode license. Please resolve this by running:
  sudo xcodebuild -license


対処

書いてある通りにやってみただけですw

エラーに書いてある通り、

sudo xcodebuild -licenseを実行します

MacBook-Air:~ toshiyuki$ sudo xcodebuild -license
Password:


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Apple Inc.

Xcode and Apple SDKs Agreement


という感じで色々英文がつらつらと出てきますが、

以下のように最後にagreeしたらおしまいです


By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]   agree


再度、確認


MacBook-Air:~ toshiyuki$ brew info zsh
zsh: stable 5.2 (bottled), HEAD
UNIX shell (command interpreter)
http://www.zsh.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh.rb
==> Dependencies
Required: gdbm ✘, pcre ✘
==> Options
--without-etcdir
    Disable the reading of Zsh rc files in /etc
--HEAD
    Install HEAD version
==> Caveats
In order to use this build of zsh as your login shell,
it must be added to /etc/shells.
Add the following to your zshrc to access the online help:
  unalias run-help
  autoload run-help
  HELPDIR=/usr/local/share/zsh/help


おわりに

今年はzsh使いになりたい