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

While attempting to compile my C program, running the following command: 尝试编译C程序时,运行以下命令:

gcc pthread.c -o pthread

Returns: 返回值:

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. 同意Xcode / iOS许可证需要管理员权限,请通过sudo以root身份重新运行。

and my code does not compile. 而且我的代码无法编译。

Why is this happening and how can I fix this problem? 为什么会发生这种情况,如何解决此问题?


#1楼

参考:https://stackoom.com/question/1lv7r/在使用GCC时-同意Xcode-iOS许可证需要管理员权限-请通过sudo以root身份重新运行


#2楼

Open up Xcode, and accept the new user agreement. 打开Xcode,并接受新的用户协议。 This was happening because a new version of Xcode was downloaded and the new agreement was not accepted. 之所以发生这种情况,是因为下载了新版本的Xcode,并且不接受新协议。


#3楼

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 : 请注意,除非您在命令行中添加“ accept”,否则您必须手动滚动浏览许可证并在最后同意其条款:

sudo xcodebuild -license accept

#4楼

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo . 同意Xcode / iOS许可需要管理员权限,请通过sudo以root身份重新运行。

A new version of OSX or XCode was installed and Apple wants you to agree to their Terms and Conditions. 已安装新版本的OSX或XCode,Apple希望您同意其条款和条件。 So just launch Xcode and "Agree" to them. 因此,只需启动Xcode并“同意”即可。


#5楼

Follow these steps: 跟着这些步骤:

  1. Open Terminal. 打开终端。
  2. Enter this command: sudo xcodebuild --license . 输入以下命令: sudo xcodebuild --license
  3. Enter system password. 输入系统密码。
  4. Agree to the license. 同意许可。

#6楼

打开XCode并接受许可证可解决此问题。

“在使用GCC时,同意Xcode / iOS许可证需要管理员权限,请通过sudo以root身份重新运行。”相关推荐

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

    更新了xcode后使用goland运行项目时提示 Agreeing to the Xcode/iOS license requires admin privileges, please re-run ...

  2. 【IOS自动化解放双手系列一】unity3D导出xcode 工程并配置各种权限

    打包是程序员必经之路.如何实现自动化是一个程序员的基本素质.(都是因为我懒,哈哈哈). 使用环境 :unity3D 2017.4.7 Mac Pro 打包分一下几个部分 : 1.unity3D导出xc ...

  3. 【CSDN下载】第二期:Xcode iOS真机镜像包、人脸探测与识别源码资源

    为便于广大开发者对热门资源的下载需求,下载频道专为广大开发者开辟了推荐一周IT优质资源通道,以供开发者参考下载,同时欢迎大家上传优质资源并留言所需的资源,小编会汇总所需,及时奉上所求. 工具安装包系列 ...

  4. 消除Xcode iOS项目的警告

    消除Xcode iOS项目的警告 作者  犯傻小二  关注 2016.03.10 15:22*  字数 8287  阅读 3839 评论 0 喜欢 7 如果你有强迫症,看到项目中那么多警告肯定特别心烦 ...

  5. 基于XCode IOS开发系统实现的新闻APP设计

    一.项目概述 1.1 项目介绍 本次课程设计所实现的新闻阅读APP是基于XCode IOS开发系统上开发的一款可以查看,收藏以及删除新闻的一款IOS应用软件.它有着启动界面.登录界面,在输入正确的账号 ...

  6. linux卸载mpfr,Red Hat Linux在安装gcc时遇到的问题汇总

    找到了一个比较老的RedHatlinux,想要装上apache+tomcat.由于是在虚拟机中运行,我想先装一个vmware-tools提高性能. 但是安装的过程中我发现竟然找不到gcc.于是我就去网 ...

  7. Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)

    Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题) 参考文章: (1)Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题) (2)https://www.cnblogs. ...

  8. Ubuntu安装Gcc时,显示“无法解析域名cn.archive.ubuntu.com”,如下方式可解决

    ubuntu安装Gcc时,显示"无法解析域名cn.archive.ubuntu.com".用了好多办法,都不能解决,如下方法可以解决,然后继续安装软件: 第一步,在ubuntu运行 ...

  9. 解决xcode iOS真机调试正常,模拟器失败问题

    解决xcode iOS真机调试正常,模拟器失败问题 参考文章: (1)解决xcode iOS真机调试正常,模拟器失败问题 (2)https://www.cnblogs.com/HemJohn/p/55 ...

最新文章

  1. 28岁女博士生被骂“学术媛”,只因在网上分享自己牛津年级第一成绩毕业......
  2. (转载)JavaScript一些实用技巧(http://it.chinawin.net/softwaredev/article-261f.html)
  3. python的类与模块_Python类与模块属性
  4. mysql配置环境变量(win 10)_mysql配置环境变量(win 10)
  5. 【递归与递推】青蛙过河
  6. Git 仓库基础操作
  7. 参数化查询为什么能够防止SQL注入
  8. python class类的self_Python类class参数self原理解析
  9. hdu 2604 Queuing AC自动机构造递推式-矩阵-结果
  10. 开源路由器-OpenWRT/梅林
  11. 【转载】《三体》:给时光以生命,给岁月以文明
  12. 活前缀及构造活前缀的DFA
  13. Xcode 禁用indexing
  14. 养蚕日记软件测试,养蚕的过程日记300字
  15. C/C++中关于交换(Swap)函数的三种方法
  16. 【新闻资讯】淘宝客达人:网赚盈利模式之淘宝客盈利技巧分享
  17. shell基础之04
  18. dc是什么游戏的简称_“DC”是哪种国际卡的简称()A.VISAB.万事达C.运通D.大来
  19. JavaScript很少为人所知的玩法
  20. ThinkPhp 表单提交数据

热门文章

  1. android MotionEvent
  2. WindowManager.LayoutParams各种flag含义
  3. 快速上手的Glide4.x教程
  4. Android 触摸事件处理机制
  5. python伪造邮件发件地址_python写一个邮箱伪造脚本
  6. Hive Serde、Beeline、JDBC
  7. Flutter切换tab后保留tab状态
  8. JSONSerialization.ReadingOption详解
  9. iOS架构-静态库.framework(引用第三方SDK、开源库、资源包)(9)
  10. GridView学习记录(一)