安裝Homebrew的命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
在我安裝Homebrew的過(guò)程中遇到了好多問(wèn)題,
第一個(gè)問(wèn)題是
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
原因:curl的postBuffer的默認(rèn)值太小
解決方案:終端執(zhí)行g(shù)it config --global http.postBuffer 524288000,把postBuffer值改成500M
然后我執(zhí)行了上面安裝homebrew的命令,又報(bào)了下面的錯(cuò)誤
Warning: /usr/local/bin is not in your PATH
原因:沒(méi)有配置path
解決方案:
1、touch .bash_profile
2、open .bash_profile
3、在打開(kāi)的文件中添加:export PATH=/usr/local/bin:$PATH
4、source .bash_profile
然后再次執(zhí)行這個(gè)命令安裝homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
這次沒(méi)有報(bào)錯(cuò)了

然后輸入brew驗(yàn)證是否安裝
成功以后會(huì)顯示如下內(nèi)容
