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

后端 未结 11 1192
故里飘歌
故里飘歌 2020-11-30 16:54

While attempting to compile my C program, running the following command:

gcc pthread.c -o pthread

Returns:

Agreeing

11条回答
  •  眼角桃花
    2020-11-30 17:26

    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
    

提交回复
热议问题