1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > “在使用GCC时 同意Xcode / iOS许可证需要管理员权限 请通过sudo以root身份重新运行。”

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

时间:2023-06-03 17:49:32

相关推荐

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

本文翻译自:“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楼

参考:/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 viasudo.同意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:跟着这些步骤:

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

#6楼

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。