Xcode Command Line Tools installation
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):
- Ready terminal command: xcode-select --install
- Open Settings > General > Software Update
- Run the command, follow the prompt to install, then this will pop up while it's downloading
- Initiate the update in Software Update simultaneously
- The terminal command's prompt finally returns this:
- Updates remain available in Software Update, but "Update Now" doesn't make anything happen
- Return to terminal & run: xcode-select -p
- 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.
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.
Unfortunately, it seems the command line doesn't work any more.
The only way I've been able to get this work is by manually installing: https://developer.apple.com/download/all/?q=xcode