LoginSignup
0
0

More than 5 years have passed since last update.

Scalaインストール(事前準備編)

Last updated at Posted at 2015-10-07

仕事でScalaを使う事になったので、これから何かしらあった場合に振り返れるように備忘録として書き留めておく。

という事で、まずはインストール。

環境

OS:OS X Yosemite(10.10.5)
Java:1.8.0_40

Javaのインストール

OracleのサイトのここからJDKをダウンロードしてインストールすれば完了。

HomeBrewのインストール

今後、何かしらインストールする場合にパッケージマネージャーがあった方がいいだろうという事でHomeBrewをインストールする事にする。

Command Line Tools for Xcodeのインストール

Homebrewのインストールに必要になるらしいので、インストールする。
ちなみに、事前にXcodeをインストールして、ライセンス使用許諾契約に同意しておく必要がある。

$ xcode-select --install
xcode-select: note: install requested for command line developer tools

上記のコマンドを打つとダイヤログが出てくる。

スクリーンショット 2015-10-08 1.07.19.png

後は、

  1. 「インストール」ボタンを押す。
  2. 使用許諾契約画面で「同意する」ボタンを押す。

で、インストールが始まり、

スクリーンショット 2015-10-08 1.13.01.png

が出れば完了。

Homebrewのインストール

HomeBrewのサイトに表示されているコマンドを実行するだけ。

ちなみに、事前にXcodeのライセンス使用許諾契約に同意していないと…。

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
    sudo xcodebuild -license

と表示され、Homebrewがインストール出来ないので、Xcodeを立ち上げるか、表示されている「sudo xcodebuild -license」を実行する。

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
/usr/local/lib
==> The following directories will have their owner set to *****:
/usr/local/.
/usr/local/bin
/usr/local/lib
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
/usr/local/lib

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/lib

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
==> /usr/bin/sudo /usr/sbin/chown ***** /usr/local/. /usr/local/bin /usr/local/lib
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin /usr/local/lib
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown ***** /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3769, done.
remote: Compressing objects: 100% (3608/3608), done.
remote: Total 3769 (delta 43), reused 528 (delta 26), pack-reused 0
Receiving objects: 100% (3769/3769), 3.20 MiB | 4.55 MiB/s, done.
Resolving deltas: 100% (43/43), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 5d09dd3 consul-template: add 0.10.0 bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started

途中でEnterキーとパスワードの入力が促されます。
インストールが終わると次のステップとして「brew help」を実行しなさいと言われる。

Homebrewのインストール確認

先ほど指示された「brew help」を実行してみる。

$ brew help
Example usage:
  brew [info | home | options ] [FORMULA...]
  brew install FORMULA...
  brew uninstall FORMULA...
  brew search [foo]
  brew list [FORMULA...]
  brew update
  brew upgrade [FORMULA...]
  brew pin/unpin [FORMULA...]

Troubleshooting:
  brew doctor
  brew install -vd FORMULA
  brew [--env | config]

Brewing:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]
  https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md

Further help:
  man brew
  brew home

問題なく実行出来ているようなので、Homebrewのバージョンを確認してみる。

$ brew -v
Homebrew 0.9.5 (git revision 5d09; last commit 2015-10-07)

0.9.5がインストールされてる。

念の為、Homebrewのアップデートコマンドを実行してみる。

$ brew update
Already up-to-date.

どうやら最新らしい。

と、ここまでが、思いのほか長くなったので、次に続く。

0
0
0

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
0