mac 安裝brew報錯 Failed to connect to raw.githubusercontent.com port 443: Connection refused解決辦法

mac劍指喪心病狂,連最基本的telnet命令都沒有,沒辦法,那我們就只能自己安裝telnet命令了。

安裝telnet前需要安裝hongbrew,很簡單,複製下面的命令到你的終端工具:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

此時,在我的電腦上報了一個錯,居然拒絕連接。。

Failed to connect to raw.githubusercontent.com port 443: Connection refused

這時,解決辦法也很簡單,就是配置一個代理,把下面的內容配置到你的host中即可解決。

199.232.28.133 raw.githubusercontent.com

配置完之後,再運行剛纔的命令,效果如下:

Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

==> 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

Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (47/47), done.
Receiving objects:  63% (87846/137462), 25.03 MiB | 26.00 KiB/s

好了,等brew安裝完成之後,接着用如下命令安裝telnet就大功告成了。

brew install telnet

大家好,我是灰太狼。那我現在就走吧! 有幫助?點個贊支持一下。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章