1、在终端输入:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
然后等待Homebrew自动安装。
H$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Password:
==> 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: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (10/10), done.
Unpacking objects: 100% (10/10), done.
remote: Total 10 (delta 5), reused 0 (delta 0), pack-reused 0
From https://github.com/Homebrew/brew
* [new branch] dependabot/bundler/Library/Homebrew/sorbet-0.5.5877 -> origin/dependabot/bundler/Library/Homebrew/sorbet-0.5.5877
* [new branch] dependabot/bundler/Library/Homebrew/sorbet-runtime-0.5.5877 -> origin/dependabot/bundler/Library/Homebrew/sorbet-runtime-0.5.5877
HEAD is now at ebafc70bc Merge pull request #8407 from dawidd6/ruby-w0
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 781274 (delta 16), reused 18 (delta 8), pack-reused 781244
Receiving objects: 100% (781274/781274), 310.91 MiB | 35.00 KiB/s, done.
Resolving deltas: 100% (521093/521093), done.
Updating files: 100% (5445/5445), done.
Tapped 2 commands and 5190 formulae (5,470 files, 341MB).
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
No analytics data has been sent yet (or will be during this `install` run).
==> 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