yum 无法访问存储库

yum 无法访问存储库

我在 CentOS 7(版本 7.6.1810)上尝试的大多数 yum 任务在尝试访问存储库时似乎都会停止,例如,当我运行进程时,yum install php该进程会冻结在如下所示的行上

C7.0.1406-base/primary      100% [================================] 390 kB/s | 2.4 MB  00:00:00 ETA

Ctrl当我点击+时,该过程会继续,C但很快就会在类似的行上停止。

顺便说一下命令yum repolist all返回

Loaded plugins: axelget, fastestmirror, langpacks
No metadata available for C7.0.1406-base
No metadata available for C7.0.1406-centosplus
repomd.xml                                                                                                                                                                                                            | 2.9 kB  00:00:00
update C7.0.1406-extras metadata successfully
repomd.xml                                                                                                                                                                                                            | 2.9 kB  00:00:00
update C7.0.1406-fasttrack metadata successfully
No metadata available for C7.0.1406-updates
No metadata available for C7.1.1503-base
No metadata available for C7.1.1503-centosplus
No metadata available for C7.1.1503-extras
No metadata available for C7.1.1503-fasttrack
No metadata available for C7.1.1503-updates
No metadata available for C7.2.1511-base
No metadata available for C7.2.1511-centosplus
No metadata available for C7.2.1511-extras
No metadata available for C7.2.1511-fasttrack
No metadata available for C7.2.1511-updates
No metadata available for C7.3.1611-base
No metadata available for C7.3.1611-centosplus
No metadata available for C7.3.1611-extras
No metadata available for C7.3.1611-fasttrack
No metadata available for C7.3.1611-updates
No metadata available for C7.4.1708-base
No metadata available for C7.4.1708-centosplus
No metadata available for C7.4.1708-extras
No metadata available for C7.4.1708-fasttrack
No metadata available for C7.4.1708-updates
No metadata available for base
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for ius
No metadata available for rpmfusion-free-updates
No metadata available for rpmfusion-nonfree-updates
No metadata available for updates
No metadata available for webtatic
Loading mirror speeds from cached hostfile
 * base: mirrors.vooservers.com
 * elrepo: mirrors.coreix.net
 * epel: mirrors.ukfast.co.uk
 * extras: mirror.as29550.net
 * ius: lon.mirror.rackspace.com
 * rpmfusion-free-updates: mirror.ehv.weppel.nl
 * rpmfusion-nonfree-updates: mirror.ehv.weppel.nl
 * updates: mirrors.vooservers.com
 * webtatic: uk.repo.webtatic.com
(1/13): C7.0.1406-extras/x86_64/primary_db                                     |  43 kB  00:00:00
(2/13): C7.0.1406-fasttrack/x86_64/primary_db                                  | 124 kB  00:00:00
(3/13): C7.1.1503-extras/x86_64/primary_db                                     | 120 kB  00:00:00
(4/13): C7.1.1503-fasttrack/x86_64/primary_db                                  |  71 kB  00:00:00
(5/13): C7.2.1511-fasttrack/x86_64/primary_db                                  | 1.2 kB  00:00:00
(6/13): C7.2.1511-extras/x86_64/primary_db                                     | 166 kB  00:00:00
(7/13): C7.3.1611-fasttrack/x86_64/primary_db                                  | 1.2 kB  00:00:00
(8/13): C7.3.1611-extras/x86_64/primary_db                                     | 191 kB  00:00:00
(9/13): C7.4.1708-fasttrack/x86_64/primary_db                                  | 1.2 kB  00:00:00
(10/13): C7.4.1708-extras/x86_64/primary_db                                    | 185 kB  00:00:00
(11/13): C7.0.1406-centosplus/x86_64/primary_db                                | 3.5 MB  00:00:01
(12/13): C7.0.1406-base/x86_64/primary_db                                      | 4.9 MB  00:00:01
(13/13): C7.0.1406-updates/x86_64/primary_db                                   | 7.2 MB  00:00:02
repo id                                                       repo name                                                                        status
!C7.0.1406-base/x86_64                                        CentOS-7.0.1406 - Base                                                           enabled:  8,465
!C7.0.1406-centosplus/x86_64                                  CentOS-7.0.1406 - CentOSPlus                                                     enabled:    123
!C7.0.1406-extras/x86_64                                      CentOS-7.0.1406 - Extras                                                         enabled:    104
!C7.0.1406-fasttrack/x86_64                                   CentOS-7.0.1406 - CentOSPlus                                                     enabled:    155
!C7.0.1406-updates/x86_64                                     CentOS-7.0.1406 - Updates                                                        enabled:  1,725
!C7.1.1503-base/x86_64                                        CentOS-7.1.1503 - Base                                                           enabled:  8,652
!C7.1.1503-centosplus/x86_64                                  CentOS-7.1.1503 - CentOSPlus                                                     enabled:     73
!C7.1.1503-extras/x86_64                                      CentOS-7.1.1503 - Extras                                                         enabled:    285
!C7.1.1503-fasttrack/x86_64                                   CentOS-7.1.1503 - CentOSPlus                                                     enabled:    110
!C7.1.1503-updates/x86_64                                     CentOS-7.1.1503 - Updates                                                        enabled:  1,726
!C7.2.1511-base/x86_64                                        CentOS-7.2.1511 - Base                                                           enabled:  9,007
!C7.2.1511-centosplus/x86_64                                  CentOS-7.2.1511 - CentOSPlus                                                     enabled:    134
!C7.2.1511-extras/x86_64                                      CentOS-7.2.1511 - Extras                                                         enabled:    393
!C7.2.1511-fasttrack/x86_64                                   CentOS-7.2.1511 - CentOSPlus                                                     enabled:      0
!C7.2.1511-updates/x86_64                                     CentOS-7.2.1511 - Updates                                                        enabled:  2,560
!C7.3.1611-base/x86_64                                        CentOS-7.3.1611 - Base                                                           enabled:  9,363
!C7.3.1611-centosplus/x86_64                                  CentOS-7.3.1611 - CentOSPlus                                                     enabled:    101
!C7.3.1611-extras/x86_64                                      CentOS-7.3.1611 - Extras                                                         enabled:    451
!C7.3.1611-fasttrack/x86_64                                   CentOS-7.3.1611 - CentOSPlus                                                     enabled:      0
!C7.3.1611-updates/x86_64                                     CentOS-7.3.1611 - Updates                                                        enabled:  2,146
!C7.4.1708-base/x86_64                                        CentOS-7.4.1708 - Base                                                           enabled:  9,591
!C7.4.1708-centosplus/x86_64                                  CentOS-7.4.1708 - CentOSPlus                                                     enabled:     92
!C7.4.1708-extras/x86_64                                      CentOS-7.4.1708 - Extras                                                         enabled:    448
!C7.4.1708-fasttrack/x86_64                                   CentOS-7.4.1708 - CentOSPlus                                                     enabled:      0
!C7.4.1708-updates/x86_64                                     CentOS-7.4.1708 - Updates                                                        enabled:  2,416
!base/7/x86_64                                                CentOS-7 - Base                                                                  enabled: 10,019
base-debuginfo/x86_64                                         CentOS-7 - Debuginfo                                                             disabled
base-source/7                                                 CentOS-7 - Base Sources                                                          disabled
c7-media                                                      CentOS-7 - Media                                                                 disabled
centosplus/7/x86_64                                           CentOS-7 - Plus                                                                  disabled
centosplus-source/7                                           CentOS-7 - Plus Sources                                                          disabled
cr/7/x86_64                                                   CentOS-7 - cr                                                                    disabled
!elrepo                                                       ELRepo.org Community Enterprise Linux Repository - el7                           enabled:    124
elrepo-extras                                                 ELRepo.org Community Enterprise Linux Extras Repository - el7                    disabled
elrepo-kernel                                                 ELRepo.org Community Enterprise Linux Kernel Repository - el7                    disabled
elrepo-testing                                                ELRepo.org Community Enterprise Linux Testing Repository - el7                   disabled
!epel/x86_64                                                  Extra Packages for Enterprise Linux 7 - x86_64                                   enabled: 13,352
epel-debuginfo/x86_64                                         Extra Packages for Enterprise Linux 7 - x86_64 - Debug                           disabled
epel-source/x86_64                                            Extra Packages for Enterprise Linux 7 - x86_64 - Source                          disabled
epel-testing/x86_64                                           Extra Packages for Enterprise Linux 7 - Testing - x86_64                         disabled
epel-testing-debuginfo/x86_64                                 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug                 disabled
epel-testing-source/x86_64                                    Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source                disabled
!extras/7/x86_64                                              CentOS-7 - Extras                                                                enabled:    435
extras-source/7                                               CentOS-7 - Extras Sources                                                        disabled
fasttrack/7/x86_64                                            CentOS-7 - fasttrack                                                             disabled
!ius/x86_64                                                   IUS Community Packages for Enterprise Linux 7 - x86_64                           enabled:    676
ius-archive/x86_64                                            IUS Community Packages for Enterprise Linux 7 - x86_64 - Archive                 disabled
ius-archive-debuginfo/x86_64                                  IUS Community Packages for Enterprise Linux 7 - x86_64 - Archive Debug           disabled
ius-archive-source                                            IUS Community Packages for Enterprise Linux 7 - x86_64 - Archive Source          disabled
ius-debuginfo/x86_64                                          IUS Community Packages for Enterprise Linux 7 - x86_64 - Debug                   disabled
ius-dev/x86_64                                                IUS Community Packages for Enterprise Linux 7 - x86_64 - Dev                     disabled
ius-dev-debuginfo/x86_64                                      IUS Community Packages for Enterprise Linux 7 - x86_64 - Dev Debug Info          disabled
ius-dev-source                                                IUS Community Packages for Enterprise Linux 7 - x86_64 - Dev Source              disabled
ius-source                                                    IUS Community Packages for Enterprise Linux 7 - x86_64 - Source                  disabled
ius-testing/x86_64                                            IUS Community Packages for Enterprise Linux 7 - x86_64 - Testing                 disabled
ius-testing-debuginfo/x86_64                                  IUS Community Packages for Enterprise Linux 7 - x86_64 - Testing Debug           disabled
ius-testing-source                                            IUS Community Packages for Enterprise Linux 7 - x86_64 - Testing Source          disabled
!rpmfusion-free-updates/x86_64                                RPM Fusion for EL 7 - Free - Updates                                             enabled:    247
rpmfusion-free-updates-debuginfo/x86_64                       RPM Fusion for EL 7 - Free - Updates Debug                                       disabled
rpmfusion-free-updates-source/x86_64                          RPM Fusion for EL 7 - Free - Updates Source                                      disabled
rpmfusion-free-updates-testing/x86_64                         RPM Fusion for EL 7 - Free - Test Updates                                        disabled
rpmfusion-free-updates-testing-debuginfo/x86_64               RPM Fusion for EL 7 - Free - Test Updates Debug                                  disabled
rpmfusion-free-updates-testing-source/x86_64                  RPM Fusion for EL 7 - Free - Test Updates Source                                 disabled
!rpmfusion-nonfree-updates/x86_64                             RPM Fusion for EL 7 - Nonfree - Updates                                          enabled:     75
rpmfusion-nonfree-updates-debuginfo/x86_64                    RPM Fusion for EL 7 - Nonfree - Updates Debug                                    disabled
rpmfusion-nonfree-updates-source/x86_64                       RPM Fusion for EL 7 - Nonfree - Updates Source                                   disabled
rpmfusion-nonfree-updates-testing/x86_64                      RPM Fusion for EL 7 - Nonfree - Test Updates                                     disabled
rpmfusion-nonfree-updates-testing-debuginfo/x86_64            RPM Fusion for EL 7 - Nonfree - Test Updates Debug                               disabled
rpmfusion-nonfree-updates-testing-source/x86_64               RPM Fusion for EL 7 - Nonfree - Test Updates Source                              disabled
!updates/7/x86_64                                             CentOS-7 - Updates                                                               enabled:  2,500
updates-source/7                                              CentOS-7 - Updates Sources                                                       disabled
!webtatic/x86_64                                              Webtatic Repository EL7 - x86_64                                                 enabled:    523
webtatic-archive/x86_64                                       Webtatic Repository EL7 - x86_64 - Archive                                       disabled
webtatic-archive-debuginfo/x86_64                             Webtatic Repository EL7 - x86_64 - Archive Debug                                 disabled
webtatic-archive-source                                       Webtatic Repository EL7 - x86_64 - Archive Source                                disabled
webtatic-debuginfo/x86_64                                     Webtatic Repository EL7 - x86_64 - Debug                                         disabled
webtatic-source                                               Webtatic Repository EL7 - x86_64 - Source                                        disabled
webtatic-testing/x86_64                                       Webtatic Repository EL7 - x86_64 - Testing                                       disabled
webtatic-testing-debuginfo/x86_64                             Webtatic Repository EL7 - x86_64 - Testing Debug                                 disabled
webtatic-testing-source                                       Webtatic Repository EL7 - x86_64 - Testing Source                                disabled
repolist: 86,071

这是怎么回事?我该如何解决这个问题?

答案1

可能已detarpm启用,但基于存储库不需要。

尝试与,

yum --setopt=deltarpm=0 repolist all

答案2

这是该问题的部分解决方案。我计划有空时更新它全部答案。

如果版本特定的存储库是问题的原因,就像我的情况一样(在大多数情况下),它们需要禁用:

跑步yum -v repolist。你会看到像这样的线条

Repo-id      : C7.0.1406-base/x86_64
Repo-name    : CentOS-7.0.1406 - Base
Repo-revision: 1404489580
Repo-updated : Fri Jul  4 17:01:07 2014
Repo-pkgs    : 8,465
Repo-size    : 5.8 G
Repo-baseurl : http://vault.centos.org/7.0.1406/os/x86_64/
Repo-expire  : 21,600 second(s) (last: Thu Aug 22 13:32:14 2019)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Vault.repo

Repo-id      : C7.0.1406-centosplus/x86_64
Repo-name    : CentOS-7.0.1406 - CentOSPlus
Repo-revision: 1428416958
Repo-updated : Tue Apr  7 15:29:37 2015
Repo-pkgs    : 123
Repo-size    : 673 M
Repo-baseurl : http://vault.centos.org/7.0.1406/centosplus/x86_64/
Repo-expire  : 21,600 second(s) (last: Thu Aug 22 13:32:14 2019)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Vault.repo

记下特定于版本的 Repo-id,例如 C7.0.1406-base 和 Repo 文件名 /etc/yum.repos.d/CentOS-Vault.repo。打开文件 /etc/yum.repos.d/CentOS-Vault.repo。看起来像这样:

# CentOS Vault contains rpms from older releases in the CentOS-7
# tree.

#c7.0.1406
[C7.0.1406-base]
name=CentOS-7.0.1406 - Base
baseurl=http://vault.centos.org/7.0.1406/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

修改enabled=0enabled=1

相关内容