[SOLVED] xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Share this post and Earn Free Points!

In this post I will show you how to solve error: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


You could run across a number of mistakes and problems as a MacOS developer using Xcode and other development tools. The “xcrun: error: incorrect active developer path” problem and the message “missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun” are two frequent errors that developers encounter. This error may appear when you attempt to execute specific Xcode or Command Line" Tools-related instructions. In this post, we’ll look at this error’s causes and possible solutions.

What is xcrun and CommandLineTools?

Let’s define xcrun and CommandLineTools before we start the debugging procedure. A command-line tool offered by Apple’s Xcode development toolset is called xcrun. It is used to find and launch other command-line tools, including compilers, simulators, and other tools for software development.

On the other side, CommandLineTools is a collection of command-line tools that may be installed independently or with Xcode. For developers, these tools offer extra features including compilers, build systems, and other activities connected to development.

What causes the “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)” error?

When the active developer path, or the place where Xcode or the CommandLineTools are installed, is not configured or is set improperly, the error “xcrun: error: invalid active developer path” appears. This may occur for a number of reasons, including incomplete Xcode or CommandLineTools installations, Xcode updates or upgrades, or modifications to the system’s file structure.

How to troubleshoot the “xcrun: error: invalid active developer path” error?

Open" Terminal, and run execute the following command:

xcode-select --install

Other Possible Solutions

  1. Install or update Xcode or CommandLineTools: You can run across this problem if you don’t have the most recent version of CommandLineTools or Xcode installed. Install the most recent version of Xcode or CommandLineTools from the Mac App Store or the Apple Developer website.
  2. Set the active developer path: To set the active developer path to the location of Xcode or CommandLineTools, use the Terminal application on your Mac and type the following command:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Note: Replace “/Applications/Xcode.app/Contents/Developer” with the correct path to your Xcode installation, if it is installed in a different location.

  1. Reinstall CommandLineTools: Try reinstalling CommandLineTools if you installed them separately and are still getting the issue. Use the following command in the Terminal to accomplish this:
xcode-select --install

This will prompt you to install the CommandLineTools, and once the installation is complete, the error may be resolved.

  1. Check system permissions: Make sure you have the right access rights to the installation directory for CommandLineTools or Xcode. The issue “xcrun: error: invalid active developer path” may appear if the directory’s permissions are wrong. With the “chmod” command or the Finder’s Get Info option, you may modify the permissions.
  2. Reset Xcode preferences: You can try resetting Xcode preferences if none of the aforementioned fixes are successful. Open" Terminal and enter the following command to accomplish this:
defaults delete com.apple.dt.Xcode

You might need to edit Xcode settings after doing this since it will revert preferences to their original state.


Although the “xcrun: error: incorrect active developer path” problem might be annoying, Macintosh developers frequently experience it. You may fix this mistake and resume your development efforts without any delays by carrying out the troubleshooting procedures listed above.

Keep in mind to constantly update Xcode and CommandLineTools, and make sure you have the proper rights to access the installation folders.

You might need to contact Apple Help or the developer community again if the problem continues. Continue coding and don’t let this issue slow down your development process.

I hope it helped to you solve error: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?