DEV Community

kurab
kurab

Posted on

Check list before re-install Xcode Command Line Tool

Environment & Phenomena

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

failed to xcodebuild.

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

Really installed?

check the path

/Library/Developer/CommandLineTools
Enter fullscreen mode Exit fullscreen mode

Check Location

Xcode > Preference > Locations

xcodeLocation

For me, this setting was empty. and now it works.

$ xcodebuild -version
Xcode 12.1
Build version 12A7403
Enter fullscreen mode Exit fullscreen mode

Still not work, then Re-Install

$ xcode-select --install
Enter fullscreen mode Exit fullscreen mode

or

$ rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
Enter fullscreen mode Exit fullscreen mode

or download installer from Apple Developers

Top comments (0)