在 CentOS 上安装 Epel 存储库失败

在 CentOS 上安装 Epel 存储库失败

这已经在我的流浪虚拟机上运行了几个月,没有任何问题。我没有改变任何东西,之前已经进行过vagrant up多次vagrant destroy,没有任何问题。但现在它失败了,我无法找出问题所在。我什至无法安装vim。

版本信息

[root@localhost ~]# uname -a
Linux localhost 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# cat /etc/*{release,version}
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)

安装EPEL

[root@localhost ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/$(uname -i)/epel-release-6-8.noarch.rpm
Receiving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Warning: /var/tmp/rpm-tmp.RGvUnd: Header V3 RSA/SHA256 Signature, Key-ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@localhost ~]# yum clean all
[root@localhost ~]#

/etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

尝试检查更新(失败)

[root@localhost ~]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-stud.fht-esslingen.de
 * epel: mirrors.ircam.fr
 * extras: mirror2.hs-esslingen.de
 * updates: mirror2.hs-esslingen.de
http://mirrors.ircam.fr/pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
[...]

尝试检查不包括 epel 的更新(有效)

[root@localhost ~]# yum --disablerepo="epel" check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-stud.fht-esslingen.de
 * extras: mirror2.hs-esslingen.de
 * updates: mirror2.hs-esslingen.de
[vagrant@localhost ~]#

URLGRABBER_DEBUG

[root@localhost ~]# URLGRABBER_DEBUG=1 yum check-update 2> debug.log

2014-09-03 07:39:10,534 MIRROR: trying repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2 -> http://mirrors.ircam.fr/pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2
INFO:urlgrabber:MIRROR: trying repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2 -> http://mirrors.ircam.fr/pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2
2014-09-03 07:39:10,535 combined options: {
  'checkfunc'    : (<bound method YumRepository.checkMD of <yum.yumRepo.YumRepository object at 0x27c8490>>, ('primary_db',), {}),
  'copy_local'   : 1,
  'http_headers' : (),
  'range'        : None,
  'reget'        : 'simple',
  'size'         : '6623767',
  'text'         : 'epel/primary_db',
  'delegate'     : {
    'bandwidth'    : 0,
    'cache_openers': True,
    'checkfunc'    : None,
    'close_connection': 0,
    'copy_local'   : 0,
    'data'         : None,
    'delegate'     : None,
    'failure_callback': (<bound method YumBaseCli.failureReport of <cli.YumBaseCli object at 0x276c0d0>>, (), {}),
    'ftp_headers'  : None,
    'http_headers' : (),
    'interrupt_callback': <bound method YumBaseCli.interrupt_callback of <cli.YumBaseCli object at 0x276c0d0>>,
    'keepalive'    : True,
    'max_header_size': 2097152,
    'opener'       : None,
    'password'     : None,
    'prefix'       : None,
    'progress_obj' : <output.YumTextMeter instance at 0x279e4d0>,
    'proxies'      : None,
    'quote'        : None,
    'range'        : None,
    'reget'        : 'simple',
    'retry'        : 10,
    'retrycodes'   : [-1, 2, 4, 5, 6, 7],
    'size'         : None,
    'ssl_ca_cert'  : None,
    'ssl_cert'     : None,
    'ssl_cert_type': 'PEM',
    'ssl_context'  : None,
    'ssl_key'      : None,
    'ssl_key_pass' : None,
    'ssl_key_type' : 'PEM',
    'ssl_verify_host': True,
    'ssl_verify_peer': True,
    'text'         : None,
    'throttle'     : 0,
    'timeout'      : 30.0,
    'urlparser'    : <urlgrabber.grabber.URLParser instance at 0x28f1f38>,
    'user_agent'   : 'urlgrabber/3.9.1 yum/3.2.29',
    'username'     : None,
    }
  }
DEBUG:urlgrabber:combined options: {
  'checkfunc'    : (<bound method YumRepository.checkMD of <yum.yumRepo.YumRepository object at 0x27c8490>>, ('primary_db',), {}),
  'copy_local'   : 1,
  'http_headers' : (),
  'range'        : None,
  'reget'        : 'simple',
  'size'         : '6623767',
  'text'         : 'epel/primary_db',
  'delegate'     : {
    'bandwidth'    : 0,
    'cache_openers': True,
    'checkfunc'    : None,
    'close_connection': 0,
    'copy_local'   : 0,
    'data'         : None,
    'delegate'     : None,
    'failure_callback': (<bound method YumBaseCli.failureReport of <cli.YumBaseCli object at 0x276c0d0>>, (), {}),
    'ftp_headers'  : None,
    'http_headers' : (),
    'interrupt_callback': <bound method YumBaseCli.interrupt_callback of <cli.YumBaseCli object at 0x276c0d0>>,
    'keepalive'    : True,
    'max_header_size': 2097152,
    'opener'       : None,
    'password'     : None,
    'prefix'       : None,
    'progress_obj' : <output.YumTextMeter instance at 0x279e4d0>,
    'proxies'      : None,
    'quote'        : None,
    'range'        : None,
    'reget'        : 'simple',
    'retry'        : 10,
    'retrycodes'   : [-1, 2, 4, 5, 6, 7],
    'size'         : None,
    'ssl_ca_cert'  : None,
    'ssl_cert'     : None,
    'ssl_cert_type': 'PEM',
    'ssl_context'  : None,
    'ssl_key'      : None,
    'ssl_key_pass' : None,
    'ssl_key_type' : 'PEM',
    'ssl_verify_host': True,
    'ssl_verify_peer': True,
    'text'         : None,
    'throttle'     : 0,
    'timeout'      : 30.0,
    'urlparser'    : <urlgrabber.grabber.URLParser instance at 0x28f1f38>,
    'user_agent'   : 'urlgrabber/3.9.1 yum/3.2.29',
    'username'     : None,
    }
  }
2014-09-03 07:39:10,535 attempt 1/10: http://mirrors.ircam.fr/pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2
INFO:urlgrabber:attempt 1/10: http://mirrors.ircam.fr/pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2
2014-09-03 07:39:10,535 opening local file "/var/cache/yum/x86_64/6/epel/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2" with mode ab
INFO:urlgrabber:opening local file "/var/cache/yum/x86_64/6/epel/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2" with mode ab
* About to connect() to mirrors.ircam.fr port 80 (#0)
*   Trying 129.102.1.37... * connected
* Connected to mirrors.ircam.fr (129.102.1.37) port 80 (#0)
> GET /pub/fedora/epel/6/x86_64/repodata/9fdd4609f219b3ec5cfa5408ab03b84b2bce97ab6de268b890577ee86b998618-primary.sqlite.bz2 HTTP/1.1
User-Agent: urlgrabber/3.9.1 yum/3.2.29
Host: mirrors.ircam.fr
Accept: */*

* The requested URL returned error: 404 Not Found
* Closing connection #0
2014-09-03 07:39:10,610 exception: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
INFO:urlgrabber:exception: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
2014-09-03 07:39:10,610 calling callback: (<bound method YumBaseCli.failureReport of <cli.YumBaseCli object at 0x276c0d0>>, (), {})
INFO:urlgrabber:calling callback: (<bound method YumBaseCli.failureReport of <cli.YumBaseCli object at 0x276c0d0>>, (), {})

有任何想法吗?

答案1

@Burhan Ali 是对的,这似乎是 EPEL 存储库的临时问题。

我更改/etc/yum.repos.d/epel.repo为使用 thebaseurl而不是mirrorlist中提到的这个答案现在可以了。

答案2

对于通过 google 达到此目的的其他人来说,该问题也可能是由于 CentOS 中过时的安全软件包造成的。对我来说,修复方法相当于:

rpm -ev epel-release-6-8.noarch
yum update
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/$(uname -i)/epel-release-6-8.noarch.rpm

相关内容