美文网首页
curl: (7) Failed to connect to r

curl: (7) Failed to connect to r

作者: 欠儿不登 | 来源:发表于2020-09-08 10:36 被阅读0次
    $ /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
    

    有说被墙的,有说镜像有问题的,都尝试了,其实最终的原因是无法解析该域名的真实IP�

    1.查询真实IP

    访问查询网门站:https://www.ipaddress.com/
    输入要查询的链接,就可以查询到真实IP地址

    2.修改hosts文件

    $ sudo vi /etc/hosts
    

    输入该电脑的登录密码,回车
    按i进入编辑模式,在文件末尾输入查询到的IP地址和对应的域名,如下格式

    199.232.68.133 raw.githubusercontent.com
    

    按Esc进入命令模式,按:(冒号)输入wq,这样就修改成功了

    相关文章

      网友评论

          本文标题:curl: (7) Failed to connect to r

          本文链接:https://www.haomeiwen.com/subject/irddektx.html