RDM icon indicating copy to clipboard operation
RDM copied to clipboard

Installation error on Monterey: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Open ksonbol opened this issue 2 years ago • 5 comments

Hi, running ./install on macOS Monterey 12.3.1 fails with the following error:

Install RDM to /Applications? (Y/n): Y

An error occured; try again

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

ksonbol avatar Apr 14 '22 08:04 ksonbol

Try this: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

gothvf avatar May 02 '22 14:05 gothvf

Hi, after running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

I get this result:

xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'

What I should do?

jorgejhms avatar May 06 '22 15:05 jorgejhms

Hi, after running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

I get this result:

xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'

What I should do?

hi! did you find how to fix it?have the same problem. :(

ayoauo avatar May 22 '22 20:05 ayoauo

You need to install Xcode from the app store. Beware it's nearly 20 GBs in size. Then the aforementioned command should work.

YellowTech avatar Jun 02 '22 18:06 YellowTech

In case Xcode is already installed, the error suggests a general problem with Xcode, not the RDM library. The one liner fingers-crossed solution:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
# When proceeding, I also had to setup more stuff:
# xcodebuild -license
# xcodebuild -runFirstLaunch

For context:

This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode)

https://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error

petercsiba avatar Sep 03 '24 21:09 petercsiba