解决方法:
更换镜像源即可。
依次执行如下命令:
cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo.bakvi CentOS-Base.repo
(推荐教程:centos使用教程)
修改配置如下:
[base]name=Red Hat Enterprise Linux 7.0 -Basebaseurl=http://mirrors.163.com/centos/7/os/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7[update]name=Red Hat Enterprise Linux 7.0 -Updatesbaseurl=http://mirrors.163.com/centos/7/updates/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7[extras]name=Red Hat Enterprise Linux 7.0 -Extrasbaseurl=http://mirrors.163.com/centos/7/extras/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
保存即可。
相关视频教程推荐:linux视频教程