腾讯云服务器无法使用yum更新的解决方法
腾讯云linux服务器内网安装源的域名解析,依赖于腾讯云服务器配置的内网dns,经常会有用户遇到yum源无法安装的情况,报错提示如下:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
ruby-2.0.0.648-36.el7.x86_64.r FAILED
http://mirrors.tencentyun.com/centos/7/os/x86_64/Packages/ruby-2.0.0.648-36.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.tencentyun.com; Unknown error"ETA
Trying other mirror.
ruby-irb-2.0.0.648-36.el7.noar FAILED
http://mirrors.tencentyun.com/centos/7/os/x86_64/Packages/ruby-irb-2.0.0.648-36.el7.noarch.rpm: [Errno 14] curl#6 - “Could not resolve host: mirrors.tencentyun.com; Unknown error”
Trying other mirror.
ruby-libs-2.0.0.648-36.el7.x86 FAILED
http://mirrors.tencentyun.com/centos/7/os/x86_64/Packages/ruby-libs-2.0.0.648-36.el7.x86_64.rpm: [Errno 14] curl#6 - “Could not resolve host: mirrors.tencentyun.com; Unknown error”
Trying other mirror.
rubygem-bigdecimal-1.2.0-36.el FAILED
http://mirrors.tencentyun.com/centos/7/os/x86_64/Packages/rubygem-bigdecimal-1.2.0-36.el7.x86_64.rpm: [Errno 14] curl#6 - “Could not resolve host: mirrors.tencentyun.com; Unknown error”
我们可以将主机的 DNS 网络服务器修改为腾讯云主机默认的服务器地址即可。终端情况下使用如下命令:
vim /etc/resolv.conf
修改对应的主、次要 DNS 网络服务器 IP 地址,然后保存,重启网络服务即可。
service network restart
注意:腾讯云不同地域的内网 DNS 服务器 IP 地址是不同的,如下表:
- 广州服务器:
nameserver 10.225.30.181
nameserver 10.225.30.223 - 北京服务器:
nameserver 10.53.216.182
nameserver 10.53.216.198 - 上海服务器:
nameserver 10.236.158.114
nameserver 10.236.158.106 - 上海金融服务器:
nameserver 10.48.46.77
nameserver 10.48.46.27 - 深圳金融服务器:
nameserver 100.83.224.91
nameserver 100.83.224.88 - 香港服务器:
nameserver 10.243.28.52
nameserver 10.225.30.178 - 新加坡服务器:
nameserver 100.78.90.19
nameserver 100.78.90.8 - 多伦多服务器:
nameserver 10.116.19.185
nameserver 10.116.19.188 - 硅谷服务器:
nameserver 100.102.22.21
nameserver 100.102.22.30 - 私有网络 VPC:
nameserver 183.60.83.19
nameserver 183.60.82.98