腾讯云服务器升级实践

版权声明:转载请邮件联系我([email protected]),以取得授权,谢谢! https://blog.csdn.net/yeshennet/article/details/82287105

今天升级了一下服务器,然后执行 apt-get update 的时候报错。这里留个小笔记。

Err:1 http://mirrors.tencentyun.com/ubuntu bionic InRelease
  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
Hit:2 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Err:4 http://mirrors.tencentyun.com/ubuntu bionic-security InRelease
  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
Hit:3 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu bionic InRelease
Err:5 http://mirrors.tencentyun.com/ubuntu bionic-updates InRelease
  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
Reading package lists... Done
W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic/InRelease  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic-security/InRelease  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://mirrors.tencentyun.com/ubuntu/dists/bionic-updates/InRelease  Something wicked happened resolving 'mirrors.tencentyun.com:http' (-5 - No address associated with hostname)
W: Some index files failed to download. They have been ignored, or old ones used instead.

找了一下原因,发现我本机ping mirrors.tencentyun.com 也没能ping 通。

后来找到了这个资料

https://www.jianshu.com/p/0f4e8471a568

vim /etc/resolv.conf

nameserver 10.182.24.12
nameserver 10.182.20.26

mirrors.tencentyun.com 是内网域名,要用内网的DNS才能解析到

猜你喜欢

转载自blog.csdn.net/yeshennet/article/details/82287105