Just upgraded my Macbook from OS X 10.10 to 10.11 and updated Xcode through the app store (to version 7.0.1 build 7A1001).
Running
$ sudo xcode-select --install
results in the error:
xcode-select: error: no developer tools were found, and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
My path is completely vanilla:
$ echo "$PATH"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
and xcode-select appears to also have its built-in path set correctly:
$ sudo xcode-select -p
/Applications/Xcode.app/Contents/Developer
I tried reinstalling xcode via direct download from https://developer.apple.com/downloads/ with identical results.
I'd be grateful for ideas...
I think what Nan0r is trying to say is: don't be root. That is, run xcode-select as a non-privileged user, and it'll work just fine. That's what I did, though it took me a few days to realize it.