Mac 安裝Homebrew

brew 全稱Homebrew  是Mac OSX上的軟件包管理工具,最近如要安裝RabbitMq,可是官網強烈建議使用brew安裝,因此便有了這篇簡易隨筆。html

1.安裝命令git

ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"github

2.卸載命令ruby

輸入密碼後會開始下載homebrew,若是此時網速不穩定可能會出現錯誤提示:curl: (35) Server aborted the SSL handshake。app

此時須要執行卸載操做,輸入以下命令進行卸載:curl

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"工具

卸載完成後再次嘗試安裝。測試

3.安裝完成後fetch

經過brew命令就能夠測試brew安裝完成了url

HEAD is now at e57da60 Merge pull request #3548 from sjackman/x11
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4654, done.
remote: Compressing objects: 100% (4432/4432), done.
remote: Total 4654 (delta 36), reused 319 (delta 10), pack-reused 0
Receiving objects: 100% (4654/4654), 3.84 MiB | 56.00 KiB/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.
Tapped 4426 formulae (4,700 files, 12.0MB)
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/zhangli/Library/Caches/Homebrew
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh
MochushiledeMBP:~ zhangli$ brew
Example usage:
  brew search [TEXT|/REGEX/]
  brew (info|home|options) [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]

Troubleshooting:
  brew config
  brew doctor
  brew install -vd FORMULA

Developers:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]
  https://docs.brew.sh/Formula-Cookbook.html

Further help:
  man brew
  brew help [COMMAND]
  brew home
相關文章
相關標籤/搜索