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

大家好,我是灰太狼。那我现在就走吧! 有帮助?点个赞支持一下。

你可能感兴趣的:(工具,git,macos,brew,telnet)