LoginSignup
0

More than 3 years have passed since last update.

rbenvでのruby2.6.1インストール時「Agreeing to the Xcode/iOS license requires admin privileges」で失敗

Posted at

ruby 2.6.1をrbenvを用いてインストールしようとしたときになぜか落ちたので共有。

落ちた箇所

$ rbenv install 2.6.1                                                                                                                              
Wed Oct  2 15:02:22 2019
Downloading openssl-1.1.0j.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246
Installing openssl-1.1.0j...

BUILD FAILED (OS X 10.14.6 using ruby-build 20190423)

Inspect or clean up the working tree at /var/folders/y4/jzf9wps144x1w4hp2kwp359xrk7xs7/T/ruby-build.20191002150224.4456
Results logged to /var/folders/y4/jzf9wps144x1w4hp2kwp359xrk7xs7/T/ruby-build.20191002150224.4456.log

SIXTY_FOUR_BIT_LONG mode

Configured for darwin64-x86_64-cc.

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

こいつが怪しい。

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

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.

すると、ずらーーーーーーーーっとライセンスの情報が出ます(文章を共有するのはやめときます)

q で抜けると、「agree」, 「print」, 「cancel」の3つから操作を求められるので、ターミナル上で「agree」と入力し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

# agreeを入力してEnter

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

すると、インストールできる。

rbenv install 2.6.1                                                                                                                      28.2s  Wed Oct  2 15:03:58 2019
ruby-build: use openssl from homebrew
Downloading ruby-2.6.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.bz2
Installing ruby-2.6.1...
ruby-build: use readline from homebrew
Installed ruby-2.6.1 to /Users/xxxxxx/.rbenv/versions/2.6.1

なぜライセンス同意をいまさら求められたのかはよくわかりませんが、インストールできたのでOK。

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
0