While attempting to compile my C program, running the following command:
gcc pthread.c -o pthread
Returns:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
and my code does not compile.
Why is this happening and how can I fix this problem?
转载于:https://stackoverflow.com/questions/26197347/agreeing-to-the-xcode-ios-license-requires-admin-privileges-please-re-run-as-r
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
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo
.
A new version of OSX or XCode was installed and Apple wants you to agree to their Terms and Conditions. So just launch Xcode and "Agree" to them.
Follow these steps:
sudo xcodebuild --license
.Opening XCode and accepting the license fixes the issue.
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 ...
I entered the following in terminal:
sudo xcodebuild -license
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.
You don't need to fiddle around with any command :)
Once the XCode is updated, open the Xcode IDE program. Please accept terms and conditions.
You are all set to go :))
If you have similar issues in Intellij do as others said above me :
And you are done.!!