Xcode Command Line Tools installation

Last night I tried to install Xcode Command line tools on my new M1 Macbook pro and kept getting the error "Can't Install Software" with no explanation or further details as to what is causing this. I tried installing using xcode-select --install and also by downloading it from the delevoper.apple.com site. It would take several minutes and than at the end it would say it was unsuccessful.
Post not yet marked as solved Up vote post of hdthakker Down vote post of hdthakker
24k views
Add a Comment

Replies

did you ever succeed in resolving this issue?

I have the same

After receiving the same error, repeatedly — even after updates — I found a way to get it to work assuming you're working on Ventura 13.0.1 (22A400):

  1. Ready terminal command: xcode-select --install
  2. Open Settings > General > Software Update
  3. Run the command, follow the prompt to install, then this will pop up while it's downloading

  1. Initiate the update in Software Update simultaneously
  2. The terminal command's prompt finally returns this:

  1. Updates remain available in Software Update, but "Update Now" doesn't make anything happen
  2. Return to terminal & run: xcode-select -p
  3. Mine returns "/Applications/Xcode.app/Contents/Developer" — so I ran this: sudo xcode-select --switch /Library/Developer/CommandLineTools

Voilà, Xcode command line tools are recognized as updated. You can check xcode-select --install to see the return "xcode-select: error: command line tools are already installed, use 'Software Update' in System Settings to install updates" Now the command line tools work as intended.

  • After almost a day of trying different solutions your mentioned way solved the issue. Happy now :)

    I face this issue after upgrading to the latest macOS venture 13.0.1

Add a Comment

See if /usr/bin/cc --version returns

Target: arm64-apple-darwin22.X.X

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin

If it's close to that, everything should be good. If not sudo xcode-select --switch /Library/Developer/CommandLineTools should solve it: I'm assuming the install directory was altered during an update or abrupt uninstall.

Thank you all gents!

Did not resolve it for me I got

xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools' tlwilkinsonyyc@Thomass-MacBook-Pro ~ % xcode-select --install xcode-select: note: install requested for command line developer tools tlwilkinsonyyc@Thomass-MacBook-Pro ~ % /usr/bin/cc --version xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun tlwilkinsonyyc@Thomass-MacBook-Pro ~ % sudo xcode-select --switch /Library/Developer/CommandLineTools 

Tried all of what the people had mentioned but got nowhere. Running Ventura 13.0.1 Any other suggestions. Just was using Brew to install ffmpeg and ran into needing the command tools.