美文网首页ruby
gem install 提示 host is down 解决方法

gem install 提示 host is down 解决方法

作者: 6593443e12c1 | 来源:发表于2017-03-30 10:19 被阅读82次

    今天在执行

    gem install rubocop
    

    得到

    ERROR:  While executing gem ... (Errno::EHOSTDOWN)
        Host is down - sendto(2) for "172.16.192.100" port 53
    

    感觉很奇怪,为啥是sendto到172.16.192.100地址。
    在rubygems的github issues列表里查关键字sendto(2)得到
    gem installation via proxy will not work if an invalid name server is specified

    意思是错误的dns服务。cat /etc/resolv.conf看一眼,删除172.16.192.100解决

    相关文章

      网友评论

        本文标题:gem install 提示 host is down 解决方法

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