usr-sse2 / RDM

Easily set Mac Retina display to higher unsupported resolutions
1.16k stars 77 forks source link

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

Open ksonbol opened 2 years ago

ksonbol commented 2 years ago

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
gothvf commented 2 years ago

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

jorgejhms commented 2 years ago

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?

ayoauo commented 2 years ago

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

YellowTech commented 2 years ago

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

petercsiba commented 2 months ago

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