更新源 YUM指令之修复:YUN安装软件报错
使用yum安装软件报错:
[root@cloud yum-3.4.3]# ./yummain.py install yum
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
没有启用的repo源,查看了很多解决方案
参考文章https://blog.csdn.net/juiyy/article/details/52123518修复
主要用了这四步,
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
还参考这文章http://www.cnblogs.com/J0der/p/5566610.html继续修复yum源,具体哪一步解决问题了我也不清楚,反正之后就可以成功联网安装package了。
cd /etc/yum.repos.d
mkdir yum.repos.d
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
估计可能是上面的部分修复了问题。
下面贴上两篇文章https://blog.csdn.net/juiyy/article/details/52123518
xenserver 更新源
https://www.centos.org/download/mirrors/
https://wiki.centos.org/HowTos/CreatePublicMirrors
过后
CentOS6.8 yum安装报错
Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
解决方法
备份现有repo仓库
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
使用阿里云仓库repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
更新yum
yum clean all
yum makecache
处理完yum 源问题,即可正常安装