Apple - How to fix homebrew error: "invalid active developer path" after upgrade to OS X El Capitan?

Run the following commands to fix the above error

sudo xcode-select --install
sudo xcode-select -switch /

I found the answer on https://github.com/Homebrew/homebrew/issues/23500

I also had to do this:

sudo chown -R $(whoami):admin /usr/local

Because of some permission issues. However, do this only if you have to.


Only the following command should resolve the issue if you are the admin on the machine.

xcode-select --install

The following article helped me solve the issue

http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/


I got this problem after updating macOS to Mojave (maybe updating the OS can causes this).

To fix it, I simply installed Xcode from the App Store instead of doing the command line stuff.

Tags:

Macos

Homebrew