"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC xcode xcode

"Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC


Open up Xcode, and accept the new user agreement. This was happening because a new version of Xcode was downloaded and the new agreement was not accepted.


sudo xcodebuild -license

will take care of it with no trouble on the command line. Note that you'll have to manually scroll through the license, and agree to its terms at the end, unless you add "accept" to the command line :

sudo xcodebuild -license accept


Got stuck as I was trying to a go get ... I think it was related to git.Here is how was able to fix it ...

  1. I entered the following in terminal:

    sudo xcodebuild -license
  2. This will open the agreement. Go all the way to end and type "agree".

That takes care of go get issues.

It was quite interesting how unrelated things were.