Signup/Sign In

[SOLVED] Mac OS: xcrun: error: invalid active developer path, missing xcrun

Technology #Mac

    The reason you are seeing :Mac OS: xcrun: error: invalid active developer path, missing xcrun" error is that your system doesn't have Xcode installed. Either you have never installed it on your Macbook or it got uninstalled during any OS update.

    Mac OS: xcrun: error: invalid active developer path, missing xcrun

    So to fix this issue, install Xcode. If you are into iOS App development, you can install the complete version and it will solve this issue as well. Download the Xcode .dmg file from the Apple developers page.

    If you don't use it, like me, you can simply search for the Command Line Tools package for Xcode and download the .dmg file for it and install it. You can download it from the Apple developers page.

    The Solution for Mac OS: xcrun: error: invalid active developer path, missing xcrun:

    If you don't want to download anything and just want to run some commands in the terminal to fix this issue, then here's the command for you:

    xcode-select --install

    This is the command which can be run in the terminal and will install the command line tools for Xcode. When you run this command you will be prompted to accept the license, agree with the terms and conditions, etc.

    If you are shown that the download requires 7GB+ of space, then be aware you are being forced to download the Xcode Application, in that case, download the .dmg file for the command line tools package specifically from the Apple developer page.

    The above command should fix the issue if it doesn't run the following command too:

    xcode-select --reset

    Although this will fix your issue, as a follow-up step, you may need to set the path for the command line tools to run without Xcode.

    xcode-select --switch /Library/Developer/CommandLineTools

    If you face permission issues while running any of the above commands, use sudo with the commands. For example,

    sudo xcode-select --switch /Library/Developer/CommandLineTools

    This too can work:

    If you have the Xcode app installed, then try running the following command:

    sudo xcode-select --switch /Applications/


    This issue can happen post-OS upgrade and can make services that were running well before, useless. But the above solution should fix the error that you are facing. If none of this works for you, feel free to share your error message in the comment section below.

    Frequently Asked Questions(FAQs)

    1. What is xcrun in macos?

    xcrun is a command-line tool in macOS that enables developers to locate and execute various developer tools and utilities within the Terminal app. It allows users to interact with various developer tools installed on the system, such as compilers, linkers, simulators, and many others. xcrun is a part of the Command Line Tools package, which can be installed on macOS using the Terminal app or Xcode.

    2. Why am I getting an invalid active developer path when attempting to use Git after upgrading to macOS Monterey?

    The error "invalid active developer path" typically occurs when the developer tools are not installed or are not set up correctly on the system. This issue may arise after upgrading to a new version of macOS, where the previously installed developer tools may become outdated or incompatible. To resolve this error, one can reinstall the Command Line Tools package using the Terminal app or by installing Xcode, which includes the necessary developer tools.

    3. What is command-line developer tools Mac?

    Command-line developer tools on Mac are a set of software development tools and utilities that are primarily used through the command-line interface (CLI). These tools include compilers, linkers, debuggers, version control systems, and other software development tools. Command-line developer tools are essential for developing software applications, as they provide a fast and efficient way to build, test, and debug code.

    4. How big is command-line tools for Xcode?

    The size of the Command Line Tools package for Xcode varies depending on the version and the components selected during installation. Typically, the package size ranges from a few hundred megabytes to several gigabytes. However, users can choose to install only the required components, such as compilers, linkers, or libraries, which can significantly reduce the package size. The size of the Command Line Tools package can be checked on the Apple Developer website or through the macOS Terminal app using the du or ls commands.

    You may also like:

    I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development. Founder @ Studytonight