[fix] macOS Ventura xcrun: error: invalid active developer path missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


% git init
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
 missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

I recently ran into the above error while trying to use git on macOS Terminal

I executed the command xcode-select --install to install the Command Line Tools but it failed as well,

Can't install the software because it is not currently available from the Software Update Server

CommandLineTools installation error
Solution:

I was able to download the latest Command Line Tools for Xcode 14 beta 5.dmg using the apple developer account: https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_14_beta_5/Command_Line_Tools_for_Xcode_14_beta_5.dmg

After installing it manually the issue got fixed.

% git init
Reinitialized existing Git repository in /Users/code2care/Desktop/abc/.git/
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.