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

I think the reason: the possible reason for the installation failure is that the Xcode environment is not initialized. This is for Mac computers.

I found a lot of information on the Internet, and it is said to open this website https://raw.githubusercontent.com/Homebrew/install/master/install, I can’t open
it, so here is my solution:

1. Solution one

1. View URL

Open the website https://www.ipaddress.com/ to
query the IP address corresponding to raw.githubusercontent.com
Insert picture description here
2. Replace the host file of the system
Note: It is best to copy a copy and change
Insert picture description here
Insert picture description here
Insert picture description here
3. Then perform the installation

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

Explain: This line /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" command is actually the command to install Homebrew, the official website address everyone You can check it yourself.

2. Method two

Execute the following command

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

3. Method Three

This method is that I read other people’s brew_install.rb file. As mentioned earlier, the URL that cannot be opened is this URL https://raw.githubusercontent.com/Homebrew/install/master/install, and the corresponding content is brew_install .rb, in fact, many people posted this file on the Internet.

I also posted a
Baidu cloud download , extraction code: 4eti

If the download is successful,

1. Enter the directory where brew_install.rb is stored,

2. Execute ruby ​​brew_install.rb and install it according to the prompts

Note: If you touch a folder on the desktop, use ls to view the directory. Generally, there will be desktop cd Desktop
image.png
If you encounter other problems, please contact us and hope to help you.

Original link

Guess you like

Origin blog.csdn.net/CharlesYooSky/article/details/106354746