Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

Tags:

path

xcode

xcrun

People also ask

What is Xcrun Mac?

xcrun is a tool that helps managing Xcode versions on your system. It allows you to write scripts that don't need to know where your Xcode instance or developer tools are installed. The path to the Xcode version (or developer tools) is set/read via xcode-select . You can reset it via: sudo xcode-select --reset.

How do I change the developer path on a Mac?

Use xcode-select -switch to choose which version of Xcode you're using by default. On OSX Yosemite use xcode-select --switch path/to/Xcode.

What is Xcode-select on Mac?

Note: macOS comes bundled with xcode-select , a command-line tool that is installed in /usr/bin . It allows you to manage the active developer directory for Xcode and other BSD development tools.


I tried that and it didn't work but I found the answer. I just had to reset the developer's path:

$ sudo xcode-select --reset

Now everything is normal


Mostly this error occurs when you have installed a newer version of xcode. And the command line tools are yet to be initialized.

To resolve this: Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Please select the Xcode version for tools.

Example (For Xcode 10.0 (10A255) ): Go under Xcode Preferences > Locations (tab) > And the bottom options is Command Line Tools. Select Xcode 10.0 (10A255).

For more details please see the attached image. Hope it helps.

-- Thanks


Select Command Line Tools


In my case, I had uninstalled Xcode and then issues with git cli started. I solved the problem running the following commands:

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

and then validating new path with:

$ sudo xcode-select -p

Hope this helps!


I have faced the same issue as I have uninstalled the XCode abruptly, running the below command (from Terminal) helped me to resolve this.

sudo xcode-select -switch /

Use this sudo xcode-select -switch /

This should solve the problem.