How to solve problems like curl: (7) failed to connect to Port 443: problem with connection used

Background of

the following error was reported when installing my-zsh

sh -c "$(curl -fsSL"
curl: (7) Failed to connect to port 443: Connection refused

I recently noticed that github users’ profile pictures and images from my posts no longer show up. Then today I found an error message for the title when homeBrew and NVM were installed.

these are installed PNPM error message, can be found that the script needs to pull the code on

Internet search, found that some github domain name DNS resolution is contaminated, causing DNS resolution process can not get the correct IP address through the domain name.

DNS pollution

DNS pollution, interested friends can go to understand.


open input can’t access the domain name

query can get the correct IP address

is added in the host file of the machine. It is recommended to use switchhosts to facilitate host management of

add the above several host configuration, the page picture display will be normal, homebrew can also be installed, NVM action is flexible.


Read More: