美文网首页
027-Host is down问题解决

027-Host is down问题解决

作者: AncientMing | 来源:发表于2018-09-25 17:36 被阅读784次

    一、sudo gem install cocoapods-repo-svn

    我们要sudo gem install cocoapods-repo-svn时,出现错误

    ERROR: While executing gem ... (Errno::EHOSTDOWN)
    Host is down - send(2)

    这时:

    cat /etc/resolv.conf
    

    发现有nameserver 192.168.2.7

    然后

    open /etc/
    

    找到resolv.conf

    然后显示原文件。

    把原文件复制拖到桌面,修改,不要nameserver,或者注释掉。

    修改完成后,放回原位置并且覆盖。

    再次执行sudo gem install cocoapods-repo-svn

    问题解决:

    Fetching: cocoapods-repo-svn-3.0.0.gem (100%)
    Successfully installed cocoapods-repo-svn-3.0.0
    Parsing documentation for cocoapods-repo-svn-3.0.0
    Installing ri documentation for cocoapods-repo-svn-3.0.0
    Done installing documentation for cocoapods-repo-svn after 0 seconds
    1 gem installed

    相关文章

      网友评论

          本文标题:027-Host is down问题解决

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