腾讯云服务器升级实践

今天升级了一下服务器,然后执行 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才能解析到


2018.12.15 更新 广州

vim /etc/resolv.conf

nameserver 10.59.218.193
nameserver 10.59.218.194
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值