美文网首页
mac HomeBrew 的安装

mac HomeBrew 的安装

作者: that_is_this | 来源:发表于2020-04-19 20:43 被阅读0次

参考:
https://www.jianshu.com/p/4bca68d843b2
https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining
https://juejin.im/post/5d503ebef265da03cf7a7f48

直接执行命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

首次可能会出现问题:

Cloning into 'large-repository'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining 
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

可以执行 git config --global http.postBuffer 524288000 命令解决;

中间会有 homebrew-core 下载失败的情况,可以执行下面命令直接下载,速度会比较慢。

$ git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core

然后会出现如下,表示成功

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
HEAD is now at 3b78b1aa9 Merge pull request #7369 from dawidd6/automerge-multiple-labels

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

最后就可以安装其他的更新了

$ brew install unrar

相关文章

网友评论

      本文标题:mac HomeBrew 的安装

      本文链接:https://www.haomeiwen.com/subject/sedibhtx.html