【问题标题】:yum installation manager not working in centos 6.6yum 安装管理器在 centos 6.6 中不起作用
【发布时间】:2016-06-10 04:36:42
【问题描述】:

我在 centos 6.6 中遇到 yum 安装管理器的问题

root@mmopuru:~ # cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)

root@mmopuru:~ # uname -a
Linux mmopuru.puppetlabs.vm 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux

它抛出以下错误。我都试过了,但没用。

root@mmopuru:~ # yum install python-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
 * epel: ftp.cuhk.edu.hk
 * ius: ftp.neowiz.com
 * remi-safe: mirror.innosol.asia
 * update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again

如何解决?

当我运行 yum repolist

root@mmopuru:~ # yum repolist
Loaded plugins: fastestmirror, security
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                    | 4.0 kB     00:00
 * epel: ftp.cuhk.edu.hk
 * ius: mirror.amsiohosting.net
 * remi-safe: mirrors.thzhost.com
 * update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel                                                                                                                                             | 4.3 kB     00:00
epel/primary_db                                                                                                                                  | 4.9 MB     00:05
ius                                                                                                                                              | 2.2 kB     00:00
ius/primary_db                                                                                                                                   | 194 kB     00:01
remi-safe                                                                                                                                        | 2.9 kB     00:00
remi-safe/primary_db                                                                                                                             |  22 kB     00:00
update                                                                                                                                           | 3.4 kB     00:00
update/primary_db                                                                                                                                | 3.7 MB     00:01
repo id                                                  repo name                                                                                                status
addons                                                   CentOS-6 - Addons                                                                                            0
*epel                                                    Extra Packages for Enterprise Linux 6 - i386                                                             9,857
ius                                                      IUS Community Packages for Enterprise Linux 6 - i386                                                       356
remi-safe                                                Safe Remi's RPM repository for Enterprise Linux 6 - i386                                                    32
update                                                   CentOS-6 - Updates                                                                                         989
repolist: 11,234

/etc/yum.repos.d/centos-internal.repo的内容是

root@mmopuru:~ # cat /etc/yum.repos.d/centos-internal.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

#released updates
enabled=0
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
enabled=0
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6

【问题讨论】:

  • 你有答案吗? Remi Collect 下面给出的答案将解决这个问题。
  • 通过取消注释 baseurl 解决了

标签: centos centos6 yum centos6.5 epel


【解决方案1】:

删除“插件”存储库定义,该定义在 CentOS 6 中不存在(它仅在 CentOS 5 中存在,但为空)。

【讨论】:

    【解决方案2】:

    我刚刚回答了similar question,即同样的错误,但对于 EPEL 回购。我在这里回答,可能对一些未来的 SO 用户有帮助。


    解决方案:快速解决方法是更新您的 SSL 证书:

    yum -y upgrade ca-certificates
    

    证书更新时也可能出现上述错误,如果是这样,只需禁用导致错误的 repo 即addons,请使用以下命令:

    yum -y upgrade ca-certificates --disablerepo=addons
    

    如果您在不同的 repo 中遇到同样的错误,只需将它的名称放在 --disablerepo=<repo-name> 标志上。


    注意:如果您不是root 用户,请使用sudo

    【讨论】:

      猜你喜欢
      • 2016-10-11
      • 2023-03-13
      • 2018-09-16
      • 2015-04-13
      • 1970-01-01
      • 1970-01-01
      • 2015-03-14
      • 2015-10-17
      • 1970-01-01
      相关资源
      最近更新 更多