Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristopherA/3397c192a50461dd18a36e56ba35b11a to your computer and use it in GitHub Desktop.
Save ChristopherA/3397c192a50461dd18a36e56ba35b11a to your computer and use it in GitHub Desktop.
Xcode command line build path problems & Carthage xrun error #xcode #macOS #development

Xcode command line build path problems & Carthage xrun error

Symptom

This problem with Carthage.

"xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH"

Solution

Setting the Command Line Tools in Xcode preference. Go to:

Xcode > Preferences > Locations

Origin of problem?

This can happen even if you have only one version of Xcode . It happens when you instal Homebrew before the first Xcode installation (which makes sense because you may want to install Xcode through mas install 497799835 and mas needs homebrew).

Untested Alternatives

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer; sudo xcode-select -s /Library/Developer/CommandLineTools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment