Help us understand the problem. What is going on with this article?

Agreeing to the Xcode/iOS license... のエラーがでた時の対処法

More than 3 years have passed since last update.

なにかのコマンドを実行した時に

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

というエラーが表示されることがあります。
こういうときは、まあメッセージにある通りなんですけど Xcode のライセンスに同意する必要があるので、Xcodeを起動して出てきたダイアログの "Agree" を押せばOKです。

Xcode and iOS SDK License Agreement

コマンドライン上からやりたいときは sudo xcrun cc です。

$ sudo xcrun cc

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Enterを押すとライセンスが表示されて、最後に

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]  

と聞かれるので指示通り agree と入力すればOKです。

kazoo04
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした