gitクローンできなくなってしなった。
環境
- mac high sierra 10.13.6
git使おうとしたらこのようなエラーがでるようになってしまいました。
$ git status
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
でも、ターミナル上でxcode-selectはすでにあるよ?
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
パスを直さなきゃいけなかった。
xcode-select -p
を実行。下記のようになるはず。パスがおかしいので直す。
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
下記のコマンドを実行
sudo xcode-select -switch
パスが正しいものになってるはず。gitが使えるはず。
$ xcode-select -p
/Library/Developer/CommandLineTools