@
- mac終端執行命令/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”,無法建立連接或連接超時錯誤,錯誤信息如下:
curl: (28) Failed to connect to raw.githubusercontent.com port 443 after 75059 ms: Couldn’t connect to server
fatal: unable to access ‘https://??github??.com/Homebrew/brew/’: Failed to connect to github.com port 443: Operation timed out
Failed to connect to raw.githubusercontent.com port 443: Connection refused
解決:
1)瀏覽器訪問??https://www.ipaddress.com??,進入如下頁面
2)頁面下拉到如圖位置,輸入域名,點擊搜索
瀏覽器滾動至接近最下方,利用終端ping搜索到的ip,要ping通
3)在/etc/hosts中添加ip映射,如果映射的ip不對,則會提示超時等連接錯誤信息
-
長時間卡在 Downloading Command Line Tools for Xcode
解決:
1)終端輸入:xcode-select --install
2)mac根據提示在接通電源的情況下安裝xcode-select -
xcode-select: note: Command line tools are already installed. Use “Software Update” in System Settings or the softwareupdate command line interface to install updates
解決:
1)終端輸入sudo xcode-select -p 查看xcode-select位置(默認在/Library/Developer/CommandLineTools)
2)刪除xcode-select:sudo rm -rf /Library/Developer/CommandLineTools
3)重裝xcode-select:xcode-select --install -
error: 835 bytes of body are still expected96 MiB | 46.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Failed during: /usr/bin/git fetch --force origin
解決:
終端輸入:git config --global http.postBuffer 524288000
此時仍提示錯誤:Error: Failed to download https://formulae.brew.sh/api/formula.jws.json!
Failed during: /opt/homebrew/bin/brew update --force --quiet
如果還出現錯誤,建議刪除homebrew并重新安裝
用國內鏡像源:
刪除:/bin/zsh -c " ( c u r l ? f s S L ?? h t t p s : / / g i t e e . c o m / c u n k a i / H o m e b r e w C N / r a w / m a s t e r / H o m e b r e w U n i n s t a l l . s h ) " ??安裝: / b i n / z s h ? c " (curl -fsSL ??https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"?? 安裝:/bin/zsh -c " (curl?fsSL??https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"??安裝:/bin/zsh?c"(curl -fsSL ??https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"??
以上創作全憑經歷回憶,希望能夠幫助到您。本人從事軟件開發有5年多的時間了,現在真的好想自主創業,可沒人脈沒資源的自己難免產生著很多焦慮,這里希望同行的你能帶給我一點鼓勵,讓我能在軟件這行繼續堅持下去。同時個人整理了一些主流平臺的學習資源,需要者聯系