LoginSignup
64
31

More than 3 years have passed since last update.

Gitコマンドでxcrun: errorが出た時の対処

Posted at

はじめに

久々に自分のMacでGit使おうとしたら以下のエラーで動かなかったので、対処方法をメモしておきます。

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

環境

  • macOS Catalina10.15.3
  • git version 2.21.1 (Apple Git-122.3)

対処方法

Xcodeの開発者ツールが見当たらなくなってしまっていることが原因らしいので、ターミナルで以下を実行すると直りました。

xcode-select --install
xcode-select --reset

おわりに

MacOSをアップデートするとあるあるネタらしいので、またあったときに慌てないようにしたいです。

参考ページ

64
31
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
64
31