Mac 安裝brew時(shí)遇到curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

本人在安裝brew時(shí)遇到一下問(wèn)題:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

嘗試各種方法,包括stackoverflow上的解決方案,終于經(jīng)過(guò)了各種失敗后,找到解決辦法。
輸入指令sudo gem install redis,再輸入安裝brew指令即可。

allisondeMacBook-Pro:~ allison$ sudo gem install redis
Password:
Fetching redis-4.1.3.gem
Successfully installed redis-4.1.3
Parsing documentation for redis-4.1.3
Installing ri documentation for redis-4.1.3
Done installing documentation for redis after 1 seconds
1 gem installed
allisondeMacBook-Pro:BDFCountyEdit allison$ 

再次執(zhí)行安裝brew的命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

allisondeMacBook-Pro:~ allison$  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
==> The following existing directories will have their owner set to allison:
/usr/local/bin
==> The following existing directories will have their group set to admin:
/usr/local/bin
==> The following new directories will be created:
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
......
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (43/43), done.
Receiving objects:   7% (9301/129532), 3.64 MiB | 168.00 KiB/s 

Checking out files: 100% (5116/5116), done.
Tapped 2 commands and 4881 formulae (5,141 files, 12.8MB).
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
......
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh
allisondeMacBook-Pro:BDFCountyEdit allison$ 

OVER,當(dāng)你看到Installation successful!的時(shí)候,安裝完成。

最后編輯于
?著作權(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ù)。

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