Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid active developer path error after upgrading to El Capitan

Tags:

git

xcode

I ran into this error trying to push to git, when I typed git init.

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

I tried the following solutions.

xcode-select —install sudo xcode-select -switch sudo xcode-select —install brew doctor brew update brew upgrade brew cleanup 
like image 448
jhnath Avatar asked Oct 01 '15 20:10

jhnath


People also ask

What does Xcrun error invalid active developer path mean?

Conclusion. The xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) error is raised when you try to run a git command without having Xcode Tools installed. To fix this error, run xcode-select –install and install Xcode Tools.

Why am I getting an invalid active developer attempting to use Git after upgrading to Macos Monterey?

The problem is that one needs to explicitly agree to the license agreement. As a follow on step, you may need to reset the path to Xcode if you have several versions or want the command line tools to run without Xcode. I found the solution in this question, Command Line Tools not working.

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 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.


1 Answers

This is all you need to do:

$ xcode-select --install 
like image 187
Arcolye Avatar answered Oct 09 '22 22:10

Arcolye