- 2023.01.17 更新
安装 HomeBrew 的 官网
安装 HomeBrew 命令 :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装过程 :
Mac ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
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
==> The following existing directories will be made group writable:
/usr/local/bin
==> The following existing directories will have their owner set to shiran:
/usr/local/bin
==> The following existing directories will have their group set to admin:
/usr/local/bin
==> The following new directories will be created:
/usr/local/etc
/usr/local/include
/usr/local/Caskroom
/usr/local/Frameworks
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin
==> /usr/bin/sudo /usr/sbin/chown shiran /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin
==> /usr/bin/sudo /bin/mkdir -p /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod ug=rwx /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod go-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown shiran /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R shiran:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 223495, done.
remote: Counting objects: 100% (151/151), done.
remote: Compressing objects: 100% (126/126), done.
remote: Total 223495 (delta 23), reused 117 (delta 21), pack-reused 223344
Receiving objects: 100% (223495/223495), 63.08 MiB | 3.17 MiB/s, done.
Resolving deltas: 100% (164441/164441), done.
From https://github.com/Homebrew/brew
* [new branch] dependabot/bundler/Library/Homebrew/rubocop-rspec-2.18.0 -> origin/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.18.0
* [new branch] less-agressive-core-tap -> origin/less-agressive-core-tap
* [new branch] master -> origin/master
* [new branch] setup-homebrew-test -> origin/setup-homebrew-test
* [new tag] 3.6.19 -> 3.6.19
* [new tag] 0.4 -> 0.4
* [new tag] 3.6.9 -> 3.6.9
HEAD is now at 3e257890d Merge pull request #14367 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.17.0
==> Tapping homebrew/core
remote: Enumerating objects: 1397271, done.
remote: Counting objects: 100% (427/427), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 1397271 (delta 256), reused 401 (delta 235), pack-reused 1396844
Receiving objects: 100% (1397271/1397271), 536.40 MiB | 5.30 MiB/s, done.
Resolving deltas: 100% (973539/973539), done.
From https://github.com/Homebrew/homebrew-core
* [new branch] master -> origin/master
Updating files: 100% (6824/6824), done.
HEAD is now at cf420130c9b pyenv: update 2.3.11 bottle.
==> 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 (nor will any 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
- 检测是否安装 成功
Mac ~ % brew -v
Homebrew 3.6.19
更新 brew 版本:
brew update
brew 帮助信息:
brew -h
查看 brew 命令:
brew help