把YUM的升级点改成这个镜像站:
#vi /etc/yum.repos.d/CentOS-Base.repo
把文件里的内容改成以下就可以了
[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.be10.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirror.be10.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirror.be10.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirror.be10.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://mirror.be10.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos-4



 

Trackback: http://tb.donews.net/TrackBack.aspx?PostId=1026616

常见错误分析

问题一

Setting up Install Process
Setting up repositories
http://mirror.be10.com/centos/4.3/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to t
问题二

Setting up Install Process
Setting up repositories
http://mirror.be10.com/centos/4/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in na me resolution')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: base
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try

问题三

Setting up Install Process
Setting up repositories
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update

解决方法

Fixing the CentOS issue: Cannot find a valid baseurl for repo: update

The issue stems from yum's inability to utilize the nifty mirroring system setup for CentOS. To resolve it, you need to manually insert your actual DNS servers into /etc/resolv.conf

So, if you're behind a home network, you'll need to determine your ISP's nameservers and insert one per line into /etc/resolv.conf like this:

nameserver 202.96.209.133
nameserver 172.01.14.14
nameserver 172.01.14.28

Trackback
http://www.jroller.com/page/agileanswers?entry=fixing_the_centos_issue_cannot