I am trying to install some ports using Macports on OS X but as soon as the installation tries to invoke the C compiler I get:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Context:
- I have run
sudo xcodebuild -license
and successfully agreed to the licence however when I runxcodebuild -license
I get the same error as above. - I am running Macports in sudo:
sudo port install ghostscript
but Macports seems to drop the privileges during the installation. (Also tried using the terminal as root user but that didn't seem to help either.)
Therefore, I am seeing two options: either managing to somehow agree to the licence at my user level, or forcing Macports to retain the privileges. But so far didn't manage to do any of these.