Error: xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools' Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools


(Marcos) #1

trying to install Homebrew I got the error:
xcode-select: error: invalid developer directory ‘/Library/Developer/CommandLineTools’ Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

Reading in this forums i tried already:
xcode-select --install and then try again the installer but it didn’t help, i got first: xcode-select: note: install requested for command line developer tools
and then the same error with the installer


(Doug Pallette) #2

Any luck resolving this?


(Matt Chambers) #3

I had the same error and the only way I could get around it was to install the Xcode command line tools manually by downloading them directly from developer.apple.com. Once installed the brew install worked without issue.