環境: macOS Mojave 10.14.3
使用しているMacでRubyの環境構築をしたくてrbenvをインストールすることにしました。
rbenvをインストールするにはさらにHomebrewが必要なのね、ということでHomebrewをインストール
事前準備
- App StoreからXcodeをインストール
- Xcodeを立ち上げ規約に同意
Homebrewインストール方法
Homebrewのサイトにアクセスし、URLをターミナルでコピペ
Homebrewインストール先
https://brew.sh/
この時Xcodeの規約に同意してないとインストールできないので注意です
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
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Enumerating objects: 18, done.
略
From https://github.com/Homebrew/brew
* [new branch] master -> origin/master
* [new tag] 0.1 -> 0.1
* [new tag] 0.2 -> 0.2
* [new tag] 0.3 -> 0.3
・
・
・
* [new tag] 2.0.5 -> 2.0.5
* [new tag] 2.0.6 -> 2.0.6
HEAD is now at ee64b7caa Merge pull request #5937 from MikeMcQuaid/dev-cmd-test-cleanup
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 4957, done.
remote: Counting objects: 100% (4957/4957), done.
remote: Compressing objects: 100% (4760/4760), done.
remote: Total 4957 (delta 51), reused 354 (delta 6), pack-reused 0
Receiving objects: 100% (4957/4957), 3.99 MiB | 380.00 KiB/s, done.
Resolving deltas: 100% (51/51), done.
Checking out files: 100% (4974/4974), done.
Tapped 2 commands and 4742 formulae (4,999 files, 12.4MB).
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
やっとできた〜〜〜
$ brew help
でコマンドを確認できます。
Example usage:
brew search [TEXT|/REGEX/]
brew info [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA
Contributing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
インストールの完了確認は
$ brew doctor
Your system is ready to brew.
お疲れ様でした!