1. 程式人生 > 其它 >homebrew 安裝提示: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

homebrew 安裝提示: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

技術標籤:brewhomebrewmac

brew 安裝失敗


問題描述:
在curl 的時候就會報超時問題,報錯如下
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解決方法1:

  1. 開啟https://www.ipaddress.com/
  2. 查詢 raw.githubusercontent.com 對應的ip地址
    在這裡插入圖片描述
  3. 修改 hosts 檔案,輸入如下命令
    sudo vim /etc/hosts
    
  4. 在hosts檔案中新增
    #githubhomebrew
    查到的ip地址  raw.githubusercontent.com
    
  5. 然後執行
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    

此文章轉載自 測試人社群,僅此記錄!