Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid active developer path on MAC OS X after installing Ruby

I get this error:

xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun

This solution works, but the error occurs again after closing my terminal and reopening it; I then have to run the same commands every time I open a new terminal window.

How can I apply these changes such that they will save after closing the terminal window out?

like image 805
David Lambl Avatar asked Feb 24 '15 21:02

David Lambl


People also ask

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

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

I started getting the same error after updating to OS X El Capitan.
In my case, all I did was to install it:

sudo xcode-select --install 

And it works fine for me.

like image 97
Shuvo Avatar answered Oct 14 '22 00:10

Shuvo