LoginSignup
0
1

More than 3 years have passed since last update.

うまく動かない Xcode Command Line Tool を諦めて再インストールする前に確認すること

Posted at

実行環境と現象

  • Mac Pro (Late 2013)
  • macOS Catalina ver. 10.15.7
  • Xcode ver. 12.1 (12A7403)

xcodebuild したかったけど、動かなかった。

$ xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

インストールされてるか

homebrew が動いてりゃインストールされてるんでしょうが、一応以下にあるので、確認。

/Library/Developer/CommandLineTools

Location は設定されているか

Xcode > Preference > Locations で確認
Screen Shot 2020-10-28 at 15.47.17.png

私のは、ここが入ってませんでした。勝手に入らないの?homebrew, xcode の順に入れたから?

兎に角、動いた。

$ xcodebuild -version
Xcode 12.1
Build version 12A7403

ダメなら再インストール

xcode-select --install

または、

rm -rf /Library/Developer/CommandLineTools
xcode-select --install

または、More Downloads for Apple Developers からダウンロードしてインストール。

0
1
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
0
1