出错:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
原因:官方停止更新
解决办法:更换阿里云镜像
1. 进入centos镜像-centos下载地址-centos安装教程-阿里巴巴开源镜像站 (aliyun.com)选择自己的Centos版本,我的是6,所以选择Centos62. 复制命令在服务器上输入,出现“/etc/yum.repos.d/CentOS-Base.repo” saved 表示成功安装
3. yum clean all 清除旧的yum命令
4.yum makecache 安装最新的yum命令
经过上述步骤后,就可以正常使用yum命令了