Tag Archives: Connection refused error

MAC Install homebrew Error: Failed to connect to raw.githubusercontent.com port 443: Connection refused error:

It’s been a long time. It’s time to execute

/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 error: Error: 7,

I tried to change the agent of GIT config, but it didn’t work,

It’s no use changing the source of China University of science and technology

The final solution is as follows:

sudo vi /etc/hosts

Add the following in host

199.232.28.133 raw.githubusercontent.com

Then execute again


  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Method 2

Re install command line tools, and then execute the installation instruction. Homebrew is installed successfully.

    removing the old tools
rm -rf /Library/Developer/CommandLineTools

install xcode command line tools again

xcode-select --install

implement

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