Mac安裝Homebrew

安裝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)容

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容