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

前端 未结 6 1731
生来不讨喜
生来不讨喜 2021-02-07 21:20

I am trying to following instructions on homebrew homepage but the following

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


        
相关标签:
6条回答
  • 2021-02-07 21:48

    If you happen to be behind a proxy, You might need a way out, to exit

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

    For some other users, setting back their github https and https-proxy to default works sometimes as well.

    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
    0 讨论(0)
  • 2021-02-07 21:58

    You are most probably behind a proxy. Consider running curl command with -k parameter:

    -k, --insecure (SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.

    See this online resource for further details: http://curl.haxx.se/docs/sslcerts.html

    Check also Homebrew docs where they talk about this.

    0 讨论(0)
  • 2021-02-07 22:01

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

    0 讨论(0)
  • 2021-02-07 22:03

    For people facing this problem I had resolved it by adding a new name server into network configuration.

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

    0 讨论(0)
  • 2021-02-07 22:04

    Setting proxy with Username, password and port number worked for me

     export http_proxy=http://<MacUser>:<MacPass><proxy server>:<ProxyPort>
     export https_proxy=http_proxy
    

    After that simply execute

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
    0 讨论(0)
  • 2021-02-07 22:10

    If non of the above solutions worked and you can't ping https://github.com/ or any other websites with your terminal ,it is because of an application that monitors and controls the access of network , so make sure that your terminal is not blocked from accessing the network by any Firewalls.

    0 讨论(0)
提交回复
热议问题