如何判断哪个 Repo 是坏的?

如何判断哪个 Repo 是坏的?

我正在尝试安装一个软件包,它抱怨存储库很糟糕,但没有告诉我是哪个:

$ sudo yum install devtoolset-11-gcc-c++.x86_64
Loaded plugins: auto-update-debuginfo, fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                                                                                                                                                                                                                                                                                              | 6.3 kB  00:00:00     
 * base: mirror-hk.koddos.net
 * centos-sclo-rh: mirror-hk.koddos.net
 * centos-sclo-sclo: mirror-hk.koddos.net
 * elrepo: mirror-hk.koddos.net
 * epel: download.nus.edu.sg
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
base                                                                                                                                                                                                                                                                                                                                                                                                              | 3.6 kB  00:00:00     
centos-sclo-rh                                                                                                                                                                                                                                                                                                                                                                                                    | 3.0 kB  00:00:00     
centos-sclo-sclo                                                                                                                                                                                                                                                                                                                                                                                                  | 3.0 kB  00:00:00     
elrepo                                                                                                                                                                                                                                                                                                                                                                                                            | 3.0 kB  00:00:00     
extras                                                                                                                                                                                                                                                                                                                                                                                                            | 2.9 kB  00:00:00     
updates                                                                                                                                                                                                                                                                                                                                                                                                           | 2.9 kB  00:00:00     


 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:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. 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).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. 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>

     5. 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

disk I/O error

有没有一种简单的方法可以找出哪个存储库是坏的?

启用的存储库:

$ yum repolist enabled
Loaded plugins: auto-update-debuginfo, fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror-hk.koddos.net
 * centos-sclo-rh: mirror-hk.koddos.net
 * centos-sclo-sclo: mirror-hk.koddos.net
 * elrepo: mirror-hk.koddos.net
 * epel: download.nus.edu.sg
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
repo id                                                                                                                                                                                           repo name                                                                                                                                                                                                                        status
base/7/x86_64                                                                                                                                                                                     CentOS-7 - Base                                                                                                                                                                                                                  10,072
centos-sclo-rh/x86_64                                                                                                                                                                             CentOS-7 - SCLo rh                                                                                                                                                                                                                8,166
centos-sclo-sclo/x86_64                                                                                                                                                                           CentOS-7 - SCLo sclo                                                                                                                                                                                                                816
elrepo                                                                                                                                                                                            ELRepo.org Community Enterprise Linux Repository - el7                                                                                                                                                                              148
epel/x86_64                                                                                                                                                                                       Extra Packages for Enterprise Linux 7 - x86_64                                                                                                                                                                                   13,730
extras/7/x86_64                                                                                                                                                                                   CentOS-7 - Extras                                                                                                                                                                                                                   515
google-chrome                                                                                                                                                                                     google-chrome                                                                                                                                                                                                                         3
updates/7/x86_64                                                                                                                                                                                  CentOS-7 - Updates                                                                                                                                                                                                                4,538
repolist: 37,988

这是输出sudo yum update

$ sudo yum update
Loaded plugins: auto-update-debuginfo, fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                                                                                                                                                                                                                                                                                              | 8.9 kB  00:00:00     
 * base: mirror-hk.koddos.net
 * centos-sclo-rh: mirror-hk.koddos.net
 * centos-sclo-sclo: mirror-hk.koddos.net
 * elrepo: mirror-hk.koddos.net
 * epel: hkg.mirror.rackspace.com
 * extras: mirror-hk.koddos.net
 * updates: mirror-hk.koddos.net
base                                                                                                                                                                                                                                                                                                                                                                                                              | 3.6 kB  00:00:00     
centos-sclo-rh                                                                                                                                                                                                                                                                                                                                                                                                    | 3.0 kB  00:00:00     
centos-sclo-sclo                                                                                                                                                                                                                                                                                                                                                                                                  | 3.0 kB  00:00:00     
elrepo                                                                                                                                                                                                                                                                                                                                                                                                            | 3.0 kB  00:00:00     
epel                                                                                                                                                                                                                                                                                                                                                                                                              | 4.7 kB  00:00:00     
extras                                                                                                                                                                                                                                                                                                                                                                                                            | 2.9 kB  00:00:00     
google-chrome                                                                                                                                                                                                                                                                                                                                                                                                     | 1.3 kB  00:00:00     
updates                                                                                                                                                                                                                                                                                                                                                                                                           | 2.9 kB  00:00:00     
(1/3): epel/x86_64/updateinfo                                                                                                                                                                                                                                                                                                                                                                                     | 1.0 MB  00:00:00     
(2/3): google-chrome/primary                                                                                                                                                                                                                                                                                                                                                                                      | 1.8 kB  00:00:00     
(3/3): epel/x86_64/primary_db                                                                                                                                                                                                                                                                                                                                                                                     | 7.0 MB  00:00:00     
google-chrome                                                                                                                                                                                                                                                                                                                                                                                                                        3/3


 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:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. 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).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. 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>

     5. 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

disk I/O error

答案1

当您运行sudo yum update它时,应该指定失败的存储库,然后您可以通过编辑 repolist 或方法来删除该存储库,方法是 yum 在上述输出中向您描述的任何方式。

相关内容