I have installed XCL(Xcode command line) through xcode-select --install therefore, not whole Xcode installed.

and I can see the path

xcode-select -print-path

However, I need to accept the license, but it complains that the Xcode is not installed

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

If you recommend me to install whole Xcode first ? should I uninstall XCT first ? and if so how !

1 Answer 1


Running xcodebuild requires you to have the whole Xcode (GUI) package installed.

Instead run this command:

 sudo xcrun cc

It will allow you to accept the license from the CLI.

  • I have the same problem. This solution does not work. I get the error "clang: error: no input files"
    – pheon
    Mar 21, 2018 at 21:54
  • Perhaps you’re on a newer system like High Sierra?
    – jksoegaard
    Mar 21, 2018 at 22:53
  • I am using High Sierra. Does this solution not work with 10.13?
    – pheon
    Mar 22, 2018 at 12:26
  • Perhaps, I don't know. The question was about El Capitan, which is the version I tested the answer on.
    – jksoegaard
    Mar 22, 2018 at 19:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .