一、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