github连不上

今天早上突然发现github连不上,报错如下:

Could not resolve hostname github.com: Temporary failure in name resolution

pip 也安装不了东西

WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x78f67b3b17d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/

解决方法:

  • https://stackoverflow.com/questions/52815784/python-pip-raising-newconnectionerror-while-installing-libraries

打开 /etc/resolv.conf ,更新google的域名服务器

sudo vim  /etc/resolv.conf

然后新开一行或者在第一行加上

nameserver 8.8.8.8
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐