Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license”

在尝试首次运行GCC时,遇到错误提示需要同意Xcode/iOS的许可协议。错误信息表明,由于缺少管理员权限,无法执行gcc命令。解决方法是通过运行'sudo xcodebuild-license'启动协议接受流程,然后输入'agree'确认同意协议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  初次安装,运行gcc,按理说应该提示clang: error: no input files,结果提示这个。意思就是你没有同意协议,所以不能执行。要执行就要同意协议。

  • 提示
$ gcc
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
  • 执行
sudo xcodebuild -license

按多次空格,直到出现下述文字后,输入agree回车:

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

柳鲲鹏

能给阁下一点帮助,非常荣幸

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值