解决办法:
安装阿里云yum源
下载阿里云 wget -O /etc/yum.repos.d/CentOS-Base-epel.repo http://mirrors.aliyun.com/repo/Centos-7.repo 清理缓存 yum clean all 重新生成缓存 yum makecache 升级yum源 yum uptade
ps:如果没有 wget 命令还需要安装
yum -y install wget
如果还是不行,可以尝试安装EPEL。
EPEL(Extra Packages for Enterprise Linux),企业版Linux额外包,RHEL分布非标准包的社区类库。安装如下:
yum install -y epel-release