かすみん日記

暇なときに何か喋ります

【Homebrew】Error: You have not agreed to the Xcode license.

久しぶりにbrewコマンドを打ったら以下のエラーが出た:

Error: You have not agreed to the Xcode license. Please resolve this by running:
  sudo xcodebuild -license accept

Xcodeのライセンスに同意しろとのこと。

環境

  • MacOS Monterey 12.5.1
  • Homebrew 3.5.9
% brew --version 
Homebrew 3.5.9
Homebrew/homebrew-core (git revision 27007d7668a; last commit 2022-08-20)
Homebrew/homebrew-cask (git revision d2da3c1a45; last commit 2022-08-20)

対応

ググったら他にも遭遇している人がたくさん居るようだった。 まあ、Xcodeのライセンスに同意すればいいとのこと。

エラーメッセージにあるように、以下コマンドを実行した:

sudo xcodebuild -license accept

これでもう初めに書いたエラーは出なくなった。