[root@k1 yum.repos.d]# ll
total 44
-rw-r--r--. 1 root root 839 Sep 19 13:47 ali.repo
-rw-r--r--. 1 root root 1664 Oct 23 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Oct 23 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 Oct 23 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 Oct 23 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 Oct 23 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Oct 23 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 Oct 23 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 616 Oct 23 2020 CentOS-x86_64-kernel.repo
[root@k1 yum.repos.d]# sudo yum clean all
sudo yum makecache
sudo yum update
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
[root@k1 yum.repos.d]# sudo yum makecache
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7\&arch=x86_64\&repo=os\&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
-
Contact the upstream for the repository and get them to fix the problem.
-
Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
- Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
- Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
- Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
[root@k1 yum.repos.d]# sudo yum update
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7\&arch=x86_64\&repo=os\&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
-
Contact the upstream for the repository and get them to fix the problem.
-
Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
- Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
- Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
- Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
[root@k1 yum.repos.d]#
[root@k1 yum.repos.d]#
[root@k1 yum.repos.d]#
[root@k1 yum.repos.d]# ll
total 44
-rw-r--r--. 1 root root 839 Sep 19 13:47 ali.repo
-rw-r--r--. 1 root root 1664 Oct 23 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Oct 23 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 Oct 23 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 Oct 23 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 Oct 23 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Oct 23 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 Oct 23 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 616 Oct 23 2020 CentOS-x86_64-kernel.repo
[root@k1 yum.repos.d]# yum list java*
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
One of the configured repositories failed (CentOS-7 - Base - 163.com),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
-
Contact the upstream for the repository and get them to fix the problem.
-
Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
- Run the command with the repository temporarily disabled
yum --disablerepo=base ...
- Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable base
or
subscription-manager repos --disable=base
- Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=base.skip_if_unavailable=true
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.163.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
[root@k1 yum.repos.d]# ll
total 48
-rw-r--r--. 1 root root 1573 Sep 19 13:51 163.repo
-rw-r--r--. 1 root root 839 Sep 19 13:47 ali.repo
-rw-r--r--. 1 root root 2523 Sep 19 13:54 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Oct 23 2020 CentOS-CR.repo
-rw-r--r--. 1 root root 649 Oct 23 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 Oct 23 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 Oct 23 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Oct 23 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 Oct 23 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root 616 Oct 23 2020 CentOS-x86_64-kernel.repo
[root@k1 yum.repos.d]# rm -rf *
[root@k1 yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2523 100 2523 0 0 297 0 0:00:08 0:00:08 --:--:-- 634
[root@k1 yum.repos.d]# ll
total 4
-rw-r--r--. 1 root root 2523 Sep 19 13:54 CentOS-Base.repo
[root@k1 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/10): base/7/x86_64/group_gz | 153 kB 00:00:01
(2/10): extras/7/x86_64/filelists_db | 305 kB 00:00:07
(3/10): extras/7/x86_64/other_db | 154 kB 00:00:02
(4/10): base/7/x86_64/other_db | 2.6 MB 00:00:23
base/7/x86_64/filelists_db FAILED 10% [======= ] 290 kB/s | 6.3 MB 00:03:11 ETA
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
base/7/x86_64/primary_db FAILED 10% [======= ] 294 kB/s | 6.4 MB 00:03:08 ETA
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
extras/7/x86_64/primary_db FAILED 11% [=======- ] 321 kB/s | 6.9 MB 00:02:51 ETA
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/e12dbf10e94bc2b33b1f45e026559bc8685728b139dddae0654d96bc624c5602-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/e12dbf10e94bc2b33b1f45e026559bc8685728b139dddae0654d96bc624c5602-primary.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED 19% [============= ] 227 kB/s | 12 MB 00:03:39 ETA
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(5/10): extras/7/x86_64/primary_db | 253 kB 00:00:04
updates/7/x86_64/other_db FAILED 22% [=============== ] 238 kB/s | 13 MB 00:03:22 ETA
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/14ff80eeb5b7c2c703cb151b97a17a9cec41fbe5c820b6e73a015d522e02bfe7-other.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/14ff80eeb5b7c2c703cb151b97a17a9cec41fbe5c820b6e73a015d522e02bfe7-other.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
(6/10): base/7/x86_64/primary_db | 6.1 MB 00:01:06
(7/10): base/7/x86_64/filelists_db | 7.2 MB 00:02:27
updates/7/x86_64/filelists_db FAILED 63% [==========================================- ] 14 kB/s | 38 MB 00:27:41 ETA
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 14] curl#18 - "transfer closed with 1978334 bytes remaining to read"
Trying other mirror.
updates/7/x86_64/filelists_db FAILED 43% [=============================- ] 35 kB/s | 27 MB 00:16:27 ETA
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED 44% [============================== ] 35 kB/s | 27 MB 00:16:13 ETA
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 14] curl#18 - "transfer closed with 19384500 bytes remaining to read"
Trying other mirror.
(8/10): updates/7/x86_64/other_db | 1.6 MB 00:00:45
updates/7/x86_64/filelists_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/filelists_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/filelists_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/filelists_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.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/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
updates/7/x86_64/filelists_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/filelists_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/5369f2a80023772257211f0a8bafad10a8939d12c2997809d5bce0f65d7a0f91-filelists.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
updates/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/f19044932626155f0cd849e88972b84875fc85e3308b4d622844a911c4ef54d0-primary.sqlite.bz2: (28, 'Connection timed out after 30002 milliseconds')
Trying other mirror.
(1/2): updates/7/x86_64/filelists_db | 15 MB 00:00:16
(2/2): updates/7/x86_64/primary_db | 27 MB 00:02:21
Metadata Cache Created
[root@k1 yum.repos.d]#