


Fix Git not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
Jul 03, 2025 am 09:13 AMSome Mac Terminal users may find that git, pip, HomeBrew, and other command line tools might stop working or behave unexpectedly, displaying an error message that says “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)”. This issue can occur after a macOS system update, even though these tools were functioning correctly before.
The good news is that the “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)” error can be resolved easily. Doing so will allow git, pip, Homebrew, or any affected command line utility to function properly again.
It's worth noting that the full error text reads:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
How to Fix the "xcrun: error: invalid active developer path" Error in MacOS Terminal
As suggested by the error itself, the fix involves reinstalling or installing Command Line Tools. Even if you already have them installed, it's best to reinstall them to resolve this error—especially if the problem started after a system software update (e.g., from Mojave to Monterey).
You can install or reinstall CLT directly from the command line using the following Terminal command:
xcode-select --install
Pressing return will prompt a pop-up window showing the download progress for Command Line Tools.
Once the installation completes, it's recommended to restart your Mac. Sometimes simply reloading Terminal or opening a new session may also clear up the 'xcrun error invalid active developer path' issue, but rebooting ensures stability.
If you're using Homebrew, remember to update it after reinstalling Command Line Tools.
Still encountering the xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)?
If you've reinstalled CLT via Terminal, restarted your machine, and are still seeing the error, consider manually installing Command Line Tools by downloading the DMG file directly from Apple.
To proceed, you'll need an Apple ID. Then, visit developer.apple.com and download the latest version of Command Line Tools for Xcode and install it manually.
Again, don’t forget to update Homebrew if you’re using it. You shouldn't need to uninstall and then reinstall Homebrew; a simple update should suffice.
Git fails to work after a MacOS update due to xcrun error?
After a MacOS system update, you may find Git no longer works because of the xcrun error. The first step is to try installing the Xcode Command Line Tools:
Check System Settings / Preferences > General > Software Update to see if there’s an available Command Line Tools update.
Alternatively, reinstall Xcode Command Line Tools through Terminal:
xcode-select --install
A MacOS system update often requires an update to Command Line Tools as well.
Additionally, you might need to accept the Xcode license agreement again before everything functions normally:
sudo xcodebuild --license
Did this help fix your issues with git, pip, Homebrew, or any other tool causing the xcrun error on your Mac? Or did you discover another solution? Please share your experience in the comments below.
The above is the detailed content of Fix Git not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

You’ve had your Mac for a few years, and you’re starting to feel the effects of your device aging—the battery doesn’t hold up as well as it used to. To avoid getting stuck with a dead Mac, you have no choice but to take your charger e

The Focus Modes functionality comes with several pre-set options such as Work, Driving, Sleep, and users are also free to create custom ones for any scenario imaginable. Should you find yourself not needing a multitude of Focus modes—whether because

If you trust Siri to accurately transcribe your speech into text and send it as a message, you can activate a setting that lets Siri send messages automatically from your iPhone without asking for confirmation first.With the confirmation feature enab

Some users of Mac computers running MacOS Sierra and MacOS High Sierra have reported issues when trying to log in to an Apple ID or iCloud via System Preferences, as well as problems accessing iCloud.com using Safari. In addition, Safari fails to loa

Have you ever received a long audio message on your iPhone and while listening, the screen turns off, interrupting the playback and forcing you to start over? It's pretty frustrating, isn't it?Next time you receive a lengthy voice message on your iPh

iOS 16 is now available for iPhone users, offering a solid update packed with practical features you're sure to enjoy.The most noticeable and exciting addition is the ability to personalize your lock screen. However, there are also plenty of smaller

In this blog post, we’ve gathered the 22 most significant breaches that happened back in 2017. All of the reports were conducted by Chris Vickery — a data breach hunter, who had partnered with MacKeeper to provide repor

Customizing your Mac by renaming it helps set it apart from other devices, especially when using AirDrop, and makes it easier to identify on a network.In macOS Ventura 13 and later versions, the method for changing the computer name has changed compa
