I am attempting to install Homebrew on my new Mac (OS X 10.9.5; XCode ver 6.1), and I keep getting the following error message when I run "brew doctor":
"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."
This message repeats several times in my terminal output, and I keep getting prompted to accept the XCode license every time I start up XCode, even though I accept the license each time.
Below is what I see in terminal:
---startOuput---
$ brew doctor
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks!
Warning: Git could not be found in your PATH. Homebrew uses Git for several internal functions, and some formulae use Git checkouts instead of stable tarballs. You may want to install Git: brew install git
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths:
easy_install
easy_install-2.7
Consider setting your PATH so that /usr/local/bin occurs before /usr/bin. Here is a one-liner: echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
Warning: You have not agreed to the Xcode license. Builds will fail! Agree to the license by opening Xcode.app or running: xcodebuild -license
---endOuput---
I've done quite a bit of web research, and it seems as if the traditional solution is to do one of two things: (i) open XCode and accept the license via the GUI or (ii) accept the license via the command line with "sudo xcodebuild -license" and follow the prompts to "accept". (See, e.g., Jetbrains; Stackoverflow; GoogleCode)
But the problem is still not resolved. I have accepted the license agreement both via the GUI and the command line by running "sudo xcodebuild -license". I have done these things several times (and quite ad nauseam), but I keep getting told that I haven't accepted the XCode user license. I've also rebooted my computer repeatedly to no avail. What's really strange is that I can't seem to find any threads discussing this unique problem -- i.e., that acceptance of the XCode license agreement doesn't seem to "stick."
This is my first stack overflow post; any help would be much appreciated.
Thank you