86
58

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

High Sierraへアップデート後のgitエラー

Last updated at Posted at 2017-11-13
追記 : Catalinaでも同様の対応で解決します
追記 : Mojaveでも同様の対応で解決します

問題

mac osをHigh Sierraにアップデート。
その後、ターミナルでgitコマンドを実行するとエラーが。

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

対応

Sierraの時にも同じことあったなと思いググる。

参考
https://qiita.com/ARTS_papa/items/60ba305b23dc967bba87

下記コマンドを入力

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

スクリーンショット 2017-11-13 14.39.57.png

「インストール」を選択。 更に次の画面で「同意」を撰択してしばらく待つ。

スクリーンショット 2017-11-13 14.42.02.png

「完了」を撰択して、コマンド入力して確認。

$ git --version
git version 2.13.5 (Apple Git-94)

無事終了。

86
58
3

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
86
58

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?