600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > Mac安装brew及问题解决

Mac安装brew及问题解决

时间:2019-08-15 12:30:08

相关推荐

Mac安装brew及问题解决

1、打开终端、命令行执行:

/usr/bin/ruby -e "$(curl -fsSL /Homebrew/install/master/install)"

官方地址:https://brew.sh/index_zh-cn

2、顺利情况下

3 问题

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

Error: Failure while executing; `git clone /Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128.

Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.

Failed during: /usr/local/bin/brew update --force

解决

依次执行

// 执行下面这句命令,更换为中科院的镜像:

git clone git://mirrors./homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

// 把homebrew-core的镜像地址也设为中科院的国内镜像

cd "$(brew --repo)"

git remote set-url origin https://mirrors./brew.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://mirrors./homebrew-core.git

// 更新

brew update

// 使用

brew install node

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。