LoginSignup
5
5

More than 5 years have passed since last update.

Macにパッケージ管理ツール(Homebrew)を導入するよ。

Posted at

概要

Macって標準ではyumとかapt-getみたいなのが入っていないんですね…。

今回は、(表題ままですが)MacにHomebrewを導入する方法を綴ります。

※検証環境は OS X Yosemite です。

Homebrewって?

CentOSで言うところのyumみたいなやつ。
パッケージのインストールとかが簡単にできるよ!

導入手順

公式のトップにでかでか書いてありますが一応。 (^o^)/

1. ターミナルを起動

ss_229.png


2. コマンドを入力

インストールコマンドはこちら。
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

↓こんな表示が出たら、Enterを押して続行してね。
Press RETURN to continue or any other key to abort

パスワードを求められたら入力してEnter!
Password:



最後にこんな表示になったらOK!

==> Installation successful!
==> Next steps
Run `brew help` to get started

これでインストールは完了!

とっても簡単ね!

試しに何か入れてみる

これも公式ままだけど、wgetをインストールしてみるよ!

1. コマンドを入力

$ brew install wget

2. あとは待つだけ

MyMac:~ sango$ brew install wget
==> Installing dependencies for wget: openssl
==> Installing wget dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
☆  /usr/local/Cellar/openssl/1.0.2d_1: 464 files, 18M
==> Installing wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.16.3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wget-1.16.3.yosemite.bottle.tar.gz
☆  /usr/local/Cellar/wget/1.16.3: 9 files, 1.5M
MyMac:~ sango$

ログが止まって入力待機状態になったらインストール完了!

5
5
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
5
5