The missing package manager for macOS (or Linux)
Brew能干什么
使用 Homebrew 安装 Apple(或您的 Linux 系统)没有预装但 你需要的东西。
Homebrew 会将软件包安装到独立目录,并将其文件软链接至 /usr/local 。
Homebrew 不会将文件安装到它本身目录之外,所以您可将 Homebrew 安装到任意位置。
完全基于 Git 和 Ruby,所以自由修改的同时你仍可以轻松撤销你的变更或与上游更新合并。
安装命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装成功
查看版本:brew --version
Homebrew 2.1.16
Homebrew/homebrew-core (git revision 7956; last commit 2019-11-24)
遇到的问题
Error: Checksum mismatch.
Error: Failed to install vendor Ruby.
==> Downloading and installing Homebrew...
HEAD is now at a1939cfe7 Merge pull request #6768 from MikeMcQuaid/analytics-fix-name
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3.mavericks.bottle.tar.gz
#### 5.7%
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
Error: Checksum mismatch.
Expected: ab81211a2052ccaa6d050741c433b728d0641523d8742eef23a5b450811e5104
Actual: 72aafbfea166db678b988fef82569e92a5a05e50d09715e5d5a8ec326f2042f5
Archive: /Users/ricky/Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to install vendor Ruby.
Failed during: /usr/local/bin/brew update --force
删除路径下已经下载的包:
/Users/ricky/Library/Caches/Homebrew
重新运行命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
问题重现,重复上述删除、运行
过程,直到安装成功。
我重复了6次,才安装成功。
作者:Wuxinshui
出处:http://wuxinshui.github.io
版权归作者所有,转载请注明出处