本文共 804 字,大约阅读时间需要 2 分钟。
socket.gaierror: [Errno -3] Temporary failure in name resolution
此处是因为localhost.localdomain无法解析造成的,此时修改/etc/hosts,添加如下行解决
127.0.0.1 localhost.localdomain localhost
vim /etc/resolv.conf'添加了两行(DNS地址是咨询了服务器运营商得知的)'nameserver 202.96.209.133nameserver 61.129.88.123nameserver 114.114.114.114
vim /etc/hosts127.0.0.1 localhost127.0.0.1
cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.128.40 dev-nn001
cat /etc/hostnameprd-spider002
参考:https://blog.csdn.net/feiying00544/article/details/83113460
https://blog.csdn.net/zeli1511/article/details/80362632 http://lax.v2ex.com/t/462728