输入下面的命令即可解决问题:
- yum clean all
- yum makecache
[root@localhost yum]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
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 contrib is listed more than once in the configuration
Determining fastest mirrors
epel/metalink
http://mirrors.163.com/centos/$releasever/os/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: base. Please verify its path and try again
[root@localhost yum]# vi /etc/yum.conf
[root@localhost yum]# yum update -y
Loaded plugins: fastestmirror, refresh-packagekit, security
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 contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
epel/metalink
base
extras
rpmforge
updates
Not using downloaded repomd.xml because it is older than what we have:
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package bind-libs.i686 32:9.8.2-0.17.rc1.el6_4.5 will be updated
---> Package bind-libs.i686 32:9.8.2-0.17.rc1.el6_4.6 will be an update
---> Package bind-utils.i686 32:9.8.2-0.17.rc1.el6_4.5 will be updated
---> Package bind-utils.i686 32:9.8.2-0.17.rc1.el6_4.6 will be an update
---> Package device-mapper-multipath.i686 0:0.4.9-64.el6_4.1 will be updated
---> Package device-mapper-multipath.i686 0:0.4.9-64.el6_4.2 will be an update
---> Package device-mapper-multipath-libs.i686 0:0.4.9-64.el6_4.1 will be updated
---> Package device-mapper-multipath-libs.i686 0:0.4.9-64.el6_4.2 will be an update
---> Package gnome-screensaver.i686 0:2.28.3-24.el6 will be updated
---> Package gnome-screensaver.i686 0:2.28.3-24.el6_4.1 will be an update
---> Package kpartx.i686 0:0.4.9-64.el6_4.1 will be updated
---> Package kpartx.i686 0:0.4.9-64.el6_4.2 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
================================================================================
Updating:
Transaction Summary
================================================================================
Upgrade
Total download size: 5.6 M
Downloading Packages:
http://mirrors.163.com/centos/6/updates/i386/Packages/bind-libs-9.8.2-0.17.rc1.el6_4.6.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.163.com/centos/6/updates/i386/Packages/bind-utils-9.8.2-0.17.rc1.el6_4.6.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.163.com/centos/6/updates/i386/Packages/device-mapper-multipath-0.4.9-64.el6_4.2.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.163.com/centos/6/updates/i386/Packages/device-mapper-multipath-libs-0.4.9-64.el6_4.2.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.163.com/centos/6/updates/i386/Packages/gnome-screensaver-2.28.3-24.el6_4.1.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirrors.163.com/centos/6/updates/i386/Packages/kpartx-0.4.9-64.el6_4.2.i686.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error Downloading Packages:
[root@localhost yum]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
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 contrib is listed more than once in the configuration
Cleaning repos: base epel extras rpmforge updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@localhost yum]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
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 contrib is listed more than once in the configuration
Determining fastest mirrors
epel/metalink
base
base/group_gz
base/filelists_db
base/primary_db
base/other_db
epel
epel/group_gz
epel/filelists_db
epel/primary_db
epel/other_db
epel/updateinfo
extras
extras/filelists_db
extras/prestodelta
extras/primary_db
extras/other_db
rpmforge
rpmforge/filelists_db
rpmforge/primary_db
rpmforge/other_db
updates
updates/filelists_db
updates/prestodelta
updates/primary_db
updates/other_db
epel/pkgtags
Metadata Cache Created
[root@localhost yum]# yum -y update
Loaded plugins: fastestmirror, refresh-packagekit, security
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 contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Update Process
No Packages marked for Update
[root@localhost yum]#