Brew installation encountered the following error message:

ruby brew_install.rb      
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)"

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Copy the code

There are two solutions:

The first:

Enter this address in your browser: https://raw.githubusercontent.com/Homebrew/install/master/install after open the url above, to save the content of the web page for brew_install. Rb, location is not fixed, literally;

Curl: try ‘curl ‘–help’ or ‘curl –manual’ for more information. Finally, type Ruby brew_install.rb

The second:

Lot due to some reason, raw.githubusercontent.com domain name resolution has been polluted, so need to modify the hosts to solve this problem;

Querying the Real IP Address

In the real IP query raw.githubusercontent.com https://www.ipaddress.com/.

Modify the hosts

sudo vim /etc/hosts
Copy the code

Add the following

199.232.28.133 raw.githubusercontent.com
Copy the code

— — — — — — — —

Original link:Blog.csdn.net/qq_17555933…