LoginSignup
16
7

More than 3 years have passed since last update.

macOSをCatalinaにしてgitコマンドしたら【xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: 】の対処法

Last updated at Posted at 2020-01-09

MacのOSをMojaveからCatalinaにアップデートしたら下記の様にエラーした。

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

ん?

なんか以前も同じ様な経験をしているなと思いつつ、エラーメッセージを見つめてみる。
"invalid active developer path"→デベロッパーのパスが無効?
もうちょっと読んでみます。するとCommandLineTools?

次のラインを読んでみます。
missing xcrun....
xcodeがないのね。

【結論】MacOSをアップデートしたら、$xcode-select --installをしよう。

$xcode-select --installをすると、下記の様に表示されますので、
インストールをクリック。
スクリーンショット 2020-01-09 20.51.23.png

インストール後、
$ git status
On branch master
Changes not staged for commit:

こんな感じで動く。

RubyMineで開発すると便利

RubyMineで開発していると、何かエラーすると教えてくれます。
スクリーンショット 2020-01-09 20.48.34.png
今回はターミナルで$xcode-select --installをしましたが、
Fix Pathを押すと解決案を出してくれます。

問題が解決されますと、下記の様に表示されます。
スクリーンショット 2020-01-09 21.22.33.png

開発を手伝ってくれるツールも大切

以下より参考にしました。
Mac OS Sierraにしたらgitコマンド、ターミナル上にエラーが出てしまった。

Mac OSをcatalinaにアップデートしたら、RubyとRailsが消えた件

OSをアップデートすると何かと困ったりする。
下記も備忘録として残しておきます。
https://qiita.com/ARTS_papa/items/15f1a8b08dc386e14a62

16
7
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
16
7