Error installing homebrew on mac (curl: (6) Failed to resolve host: raw.githubusercontent.com)

I try to follow the instructions on the home page of the home page, but the following

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

returns the following error:

 curl: (6) Could not resolve host: raw.githubusercontent.com 

Any suggestions?

+8
source share
6 answers

If you find yourself behind a proxy server, you may need to log out to exit

 export http_proxy=http://YOURPROXY:PORT export ALL_PROXY=$http_proxy 

For some other users, they sometimes cancel their https and https-proxy github for default.

 git config --global --unset http.proxy git config --global --unset https.proxy 
+8
source

You are most likely a proxy. Consider running the curl command with the -k option:

-k, - insecure (SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. They tried to make all SSL connections secure using the default CA certificate package. This causes all connections to be considered an “unsafe" failure if -k is used - insecure.

See this online resource for more information: http://curl.haxx.se/docs/sslcerts.html

Also check out Homebrew Docs where they talk about it.

+2
source

For people facing this problem, I solved it by adding a new name server to the network configuration.

Click "System Preferences", then "Network", "Advanced", "DNS", "+" and enter the IP of the new name server, a good public name server is "8.8.8.8".

+1
source

If none of the above solutions worked and you cannot ping https://github.com/ or any other websites with your terminal, this is because of the application that controls and controls access to the network, so make sure your the terminal is not blocked from access to the network by any firewalls.

0
source

Throws an error on the first attempt. However, it was installed on the second attempt. The solution is to retry the call.

0
source

Setting up a proxy with username, password and port number worked for me

  export http_proxy=http://<MacUser>:<MacPass>@proxy.muc:<ProxyPort> export https_proxy=http_proxy 

After that just do

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

Source: https://habr.com/ru/post/980482/


All Articles