腾讯云服务器安装受控端失败处理办法

虚竹 2016-11-15 3400

腾讯云服务器安装受控端时会出现类似如下错误:

pv-1.4.6-1.el7.x86_64.rpm FAILED 
http://mirrors.tencentyun.com/epel/7/x86_64/p/pv-1.4.6-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.tencentyun.com; Name or service not known"| 0 B --:--:-- ETA 
Trying other mirror. 


Error downloading packages: 
pv-1.4.6-1.el7.x86_64: [Errno 256] No more mirrors to try. 

ERROR: install appnode-agent failed: exit status 1


这是由于腾讯云自带的软件源配置有错误导致的(好无语),可将系统软件源改为阿里云镜像,请参考:
http://mirrors.aliyun.com/help/centos

一个命令替换:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-`rpm -q --qf "%{version}" centos-release`.repo


然后将无效的软件源删除,使用以下命令做备份:

mv /etc/yum.repos.d/CentOS-Epel.repo /etc/yum.repos.d/CentOS-Epel.repo.bak


最后执行下命令更新缓存:

yum makecache


然后重新安装受控端即可。

最新回复 (0)
返回
发新帖