清华的源不可用,导致了一堆堆的问题
首先,检查 /etc/yum.repos.d/下边有多少个 repo 文件
[root@localhost ~]# cd /etc/yum.repo.d/
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo epel.repo gitlab_gitlab-ce.repo MysqL-community-source.repo
CentOS-Base.repo.bak CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo epel-testing.repo MysqL-community.repo Nginx.repo
经检查,发现很多的repo文件
[root@localhost ~]# yum clean all
[root@localhost ~]# yum makecache
已加载插件:fastestmirror,langpacks
base | 3.6 kB 00:00:00
epel/x86_64/Metalink | 6.4 kB 00:00:00
http://mirror2.totbb.net/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2001:ec0:102:715::44: 网络不可达"
正在尝试其它镜像。
epel | 4.3 kB 00:00:00
extras | 3.4 kB 00:00:00
http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2402:f000:1:416:101:6:6:178: 网络不可达"
正在尝试其它镜像。
http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2402:f000:1:416:101:6:6:178: 网络不可达"
正在尝试其它镜像。
http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2402:f000:1:416:101:6:6:178: 网络不可达"
正在尝试其它镜像。
^Chttp://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
正在尝试其它镜像。
现在需要做的就是删除了,除了 CentOS-Base.repo,其他的都删除
[root@localhost yum.repos.d]# rm -y CentOS-CR.repo
[root@localhost yum.repos.d]# rm -y CentOS-fasttrack.repo
[root@localhost yum.repos.d]# rm -y CentOS-Sources.repo
[root@localhost yum.repos.d]# rm -y epel.repo
[root@localhost yum.repos.d]# rm -y gitlab_gitlab-ce.repo
[root@localhost yum.repos.d]# rm -y MysqL-community-source.repo
[root@localhost yum.repos.d]# rm -y CentOS-Debuginfo.repo
[root@localhost yum.repos.d]# rm -y CentOS-Media.repo
[root@localhost yum.repos.d]# rm -y epel-testing.repo
[root@localhost yum.repos.d]# rm -y MysqL-community.repo
[root@localhost yum.repos.d]# rm -y Nginx.repo
删除之后
[root@localhost yum.repos.d]# yum makecache
已加载插件:fastestmirror,langpacks
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/12): base/7/x86_64/filelists_db | 6.7 MB 00:00:00
(2/12): base/7/x86_64/primary_db | 5.7 MB 00:00:00
(3/12): extras/7/x86_64/prestodelta | 29 kB 00:00:00
(4/12): extras/7/x86_64/primary_db | 110 kB 00:00:00
(5/12): base/7/x86_64/other_db | 2.5 MB 00:00:00
(6/12): extras/7/x86_64/filelists_db | 391 kB 00:00:00
(7/12): extras/7/x86_64/other_db | 75 kB 00:00:00
(8/12): updates/7/x86_64/prestodelta | 384 kB 00:00:00
(9/12): updates/7/x86_64/primary_db | 2.9 MB 00:00:00
(10/12): updates/7/x86_64/other_db | 328 kB 00:00:00
(11/12): base/7/x86_64/group_gz | 156 kB 00:00:05
(12/12): updates/7/x86_64/filelists_db | 1.9 MB 00:00:10
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
元数据缓存已建立