我遇到和博主一样的问题,根据博主的博客进行修改,解决问题,再此记录。
转载
https://blog.csdn.net/oschina_41140683/article/details/82426831
错误信息:
[root@cdh00 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
http://repo.mysql.com/yum/mysql-connectors-community/el/6/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://repo.mysql.com/yum/mysql-connectors-community/el/6/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
mysql-connectors-community | 2.5 kB 00:00:00
mysql-tools-community | 2.5 kB 00:00:00
mysql56-community | 2.5 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/21): base/7/x86_64/group_gz | 166 kB 00:00:01
base/7/x86_64/filelists_db FAILED B 134:33:13 ETA
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
extras/7/x86_64/filelists_db FAILED
http://mirrors.aliyun.com/centos/7/extras/x86_64/repodata/74350bac7ed47cb67ef5fbaff2f1ef4ee3fba49ad9ce1cbdc138c0f63f812a3d-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
extras/7/x86_64/prestodelta FAILED
http://mirrors.aliyun.com/centos/7/extras/x86_64/repodata/16ea92f8be1d969333867a7e9d5714d7311665c97c2fa6200b30005ccfc22182-prestodelta.xml.gz: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
base/7/x86_64/other_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/ede157be4cf5c030483ab639f8f18c6daf268d4c233037a1578b3ed8258fa461-other.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyun.com:80; Operation now in progress"
Trying other mirror.
(2/21): extras/7/x86_64/primary_db | 187 kB 00:00:11
(3/21): extras/7/x86_64/other_db | 120 kB 00:00:00
(4/21): mysql-connectors-community/x86_64/primary_db | 24 kB 00:00:00
(5/21): mysql-connectors-community/x86_64/other_db | 5.6 kB 00:00:00
(6/21): mysql-connectors-community/x86_64/filelists_db | 31 kB 00:00:01
(7/21): mysql-tools-community/x86_64/primary_db | 43 kB 00:00:01
(8/21): mysql-tools-community/x86_64/other_db | 9.5 kB 00:00:00
(9/21): mysql56-community/x86_64/primary_db | 230 kB 00:00:02
(10/21): mysql-tools-community/x86_64/filelists_db | 123 kB 00:00:05
(11/21): updates/7/x86_64/prestodelta | 538 kB 00:00:01
(12/21): mysql56-community/x86_64/other_db | 60 kB 00:00:01
(13/21): mysql56-community/x86_64/filelists_db | 633 kB 00:00:18
(14/21): updates/7/x86_64/filelists_db | 2.9 MB 00:00:15
base/7/x86_64/filelists_db FAILED B 00:40:45 ETA
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
extras/7/x86_64/filelists_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/74350bac7ed47cb67ef5fbaff2f1ef4ee3fba49ad9ce1cbdc138c0f63f812a3d-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
updates/7/x86_64/other_db FAILED B 04:32:42 ETA
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED B 18:39:25 ETA
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
base/7/x86_64/other_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/ede157be4cf5c030483ab639f8f18c6daf268d4c233037a1578b3ed8258fa461-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/filelists_db FAILED
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
extras/7/x86_64/prestodelta FAILED
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/16ea92f8be1d969333867a7e9d5714d7311665c97c2fa6200b30005ccfc22182-prestodelta.xml.gz: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/other_db FAILED
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/ede157be4cf5c030483ab639f8f18c6daf268d4c233037a1578b3ed8258fa461-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
extras/7/x86_64/filelists_db FAILED
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/74350bac7ed47cb67ef5fbaff2f1ef4ee3fba49ad9ce1cbdc138c0f63f812a3d-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
updates/7/x86_64/other_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/filelists_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
extras/7/x86_64/prestodelta FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/16ea92f8be1d969333867a7e9d5714d7311665c97c2fa6200b30005ccfc22182-prestodelta.xml.gz: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
updates/7/x86_64/other_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; Unknown error"
Trying other mirror.
base/7/x86_64/other_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/ede157be4cf5c030483ab639f8f18c6daf268d4c233037a1578b3ed8258fa461-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
updates/7/x86_64/other_db FAILED
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/03d0a660eb33174331aee3e077e11d4c017412d761b7f2eaa8555e7898e701e0-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
base/7/x86_64/filelists_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/f35d0029ad59e9fca0823be708150f5ee28ee1707cdc9bdaf420da676daafe28-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
base/7/x86_64/other_db FAILED
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/ede157be4cf5c030483ab639f8f18c6daf268d4c233037a1578b3ed8258fa461-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
extras/7/x86_64/filelists_db FAILED
http://mirrors.aliyun.com/centos/7/extras/x86_64/repodata/74350bac7ed47cb67ef5fbaff2f1ef4ee3fba49ad9ce1cbdc138c0f63f812a3d-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/c9f7215e051be605f956919357111fdf156b05cac2a4b6f4c459640755932600-primary.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
Trying other mirror.
updates/7/x86_64/other_db FAILED
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/335fd7751141c8bc6dd0c83264bb1476476ed9775d6ece7ba397fa0348b66bdf-other.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; Unknown error"
解决方法:
# vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 114.114.114.114
注意:在写入配置/etc/resolv.conf后不要重启network网络。
直接就清除缓存,测试。
如果没有奏效,则尝试使用这样的方式
解决办法:
[root@localhost ~]# cd /var/lib/rpm
[root@localhost rpm]# rm -rf __db.* # 清除原 rpmdb 文件
[root@localhost rpm]# rpm --rebuilddb # 重建 rpm 数据库
[root@localhost rpm]# yum clean all # 清除所有 yum 缓存
如果以上办法不能解决问题,也可以尝试一下的方式
# 检查 yum 源配置文件
[root@localhost rpm]# cd /etc/yum.repos.d/
# 更新 yum 源
[root@localhost yum.repos.d]# yum update -y --skip-broken
# 清除所有 yum 缓存
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base epel extras updates
Cleaning up list of fastest mirrors
# 重建 yum 缓存
[root@localhost yum.repos.d]# yum makecache