22
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcodeのライセンス同意をコマンドラインだけで切り抜ける

Last updated at Posted at 2016-01-08

Xcodeをアップデートした後、Homebrewを使おうとしたら、ライセンスに同意してないやんけボケェと怒られた。

毎度毎度、同意するためだけにXcodeを立ち上げるという苦行を強いられてきてウンザリしていたので、もうちょっと楽できないかな〜と調べたら、コンソール上でできることを知ったのでメモ。

作業手順

コンソールでおもむろにコマンドを叩く。

$ sudo xcodebuild -license


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を押せと言ってくるので、素直に押す。

すると長い規約が出てくる。スペースを押しながら読み進める。

あんまり良くないが、手を抜きたければ、q を押せばいきなり同意するか聞いてくれる。

Apple Inc.

Xcode and Apple SDKs Agreement

PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND 
CONDITIONS CAREFULLY BEFORE USING THE APPLE SOFTWARE OR APPLE SERVICES.  
THIS IS A LEGAL AGREEMENT BETWEEN YOU AND APPLE.  
IF YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS, 
CLICK THE “AGREE” BUTTON. 

・・・・・・

Software License Agreements Press 'space' for more, or 'q' to quit

で、 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] agree

You can view the license agreements in Xcode's About Box, or at 
/Applications/Xcode.app/Contents/Resources/English.lproj/Licens.rtf

これで無事、Homebrewが使えるようになった。

まったく、やれやれだぜ。

22
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?