需要配置yum源,改为国内的就可以了
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -cO /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all yum makecache
原文:https://www.cnblogs.com/aze999/p/13887904.html