Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

npm

xcode

This is very much a duplicate of xcode-select active developer directory error except none of those solutions worked for me.

$ sudo xcode-select --reset
$ sudo xcodebuild -license accept                                  
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
$ sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I don't even have xcode on my machine.

like image 647
Webnet Avatar asked Oct 27 '22 15:10

Webnet


2 Answers

The fix for me here was that my [ XCode > Preferences > Locations > Command Line Tools ] dropdown was empty. No idea why. But after clicking it and selecting the only available option my "active developer directory" error finally went away.

Mac Os 12.3.1 | Date: 5/4/22

enter image description here

like image 112
Christopher Avatar answered Oct 31 '22 08:10

Christopher


I had "xcode-select active developer directory error" too when installing Xcode beta. In your case you don't even need full Xcode, command line tools should work fine. Read this Github issue

like image 27
Billion Shiferaw Avatar answered Oct 31 '22 10:10

Billion Shiferaw