一蛤肌、國內(nèi)源安裝Homebrew
我先快速的把使用國內(nèi)源的方式整理下(親測可用):
1.首先執(zhí)行命令如下
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
image.png
- 按照提示可以選擇中科大下載源恩溅,終端輸入序號
1
,繼續(xù)執(zhí)行寺酪,中文提示非常友好坎背,以下三個提示重點關(guān)注
(1)此腳本將要刪除之前的brew(包括它下載的軟件),請自行備份寄雀。
(2)--> 腳本開始執(zhí)行 Mac os設(shè)置開機密碼方法: (設(shè)置開機密碼:在左上角蘋果圖標(biāo)->系統(tǒng)偏好設(shè)置->用戶與群組->更改密碼) (如果提示This incident will be reported. 在用戶與群組中查看是否管理員)
(3)下載速度覺得慢可以ctrl+c或control+c重新運行腳本選擇下載源
image.png
3.安裝成功提示如圖得滤,需注意:
重啟終端 或者 運行 source /Users/hanqing/.zprofile 否則可能無法使用
安裝成功
二、官方源安裝失敗報錯(不推薦)
官方源下載緩慢盒犹,各種超時懂更,特別是github的homebrew地址clone總是
Homebrew官方https://brew.sh/
官方安裝:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
這個安裝報了很多錯誤
hanqing@hanqingdeMBP-2 ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
==> Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: Operation timed out in connection to github.com:443
Failed during: git fetch --force origin
==> Tapping homebrew/core
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: Operation timed out in connection to github.com:443
Failed during: git fetch --force origin refs/heads/master:refs/remotes/origin/master