我换了中国科大的源,源的文件没有错
yum.repos.d里有两个。
[root@localhost ~]# yum install yum-fastestmirror -y
Config Error: File contains no section headers.
file: file://///etc/yum.repos.d/CentOS-Base.repo, line: 3
' # This file uses a new mirrorlist system developed by Lance Davis for CentOS.\n'
这是为什么??
nyyjy010 于 2008-11-22 15:06:10发表:
铁通害死人啊!郁闷,丢包太严重了!!有时候达到25%50%~~
nyyjy010 于 2008-11-22 15:04:42发表:
这个是我改了之后的
但还是出错
[root@localhost ~]# yum install yum-fastestmirror -y
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/ error was
[Errno 4] IOError:
* base: mirror.be10.com
* updates: centos.candishosting.com.cn
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons
baseurl=http://centos.ustc.edu.cn/centos/5/addons/i386/ error was
[Errno 4] IOError:
* addons: mirror.be10.com
* extras: centos.candishosting.com.cn
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Setting up Install Process
Parsing package install arguments
Package yum-fastestmirror - 1.1.10-9.el5.centos.noarch is already installed.
Nothing to do
当然我已经把um-fastestmirror装好了!,但是我还是想看看我配置的哪错了!
解决这个错误
这个是错误出现时配置的:
# 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/
baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
baseurl=http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/os/$basearch/
baseurl=http://mirror.be10.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
baseurl=http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/updates/$basearch/
baseurl=http://mirror.be10.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#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/
baseurl=http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/
baseurl=http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/addons/$basearch/
baseurl=http://mirror.be10.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#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/
baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
baseurl=http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/extras/$basearch/
baseurl=http://mirror.be10.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[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/
baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
baseurl=http://ftp.ncnu.edu.tw/Linux/CentOS/$releasever/centosplus/$basearch/
baseurl=http://mirror.be10.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
nyyjy010 于 2008-11-22 14:54:55发表:
但是默认的就是有#这个的!
难道开头centos-ustc-edu-cn.repo
要和文件名相对应?
you_me 于 2008-11-22 14:51:01发表:
#号开头都是注释,没用,提供没有#号开头的行
nyyjy010 于 2008-11-22 14:43:52发表:
换回centOS默认源的话就没问题了,
还有这个yum install yum-fastestmirror -y 是正确的
配置错误
但还找出,换回默认的就正确了!
继续努力!
再试试!
nyyjy010 于 2008-11-22 09:09:41发表:
这是配置科大源的文件头,
#centos-ustc-edu-cn.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.
换回centOS默认源的话就没问题了,
还有这个yum install yum-fastestmirror -y 是正确的
微宝贝 于 2008-11-22 06:35:27发表:
你的源配置文件有误,不是告诉你在第三行吗??自己看那看那是不是书写错误。其实用官方的源就行了,虽然慢点,但绝对的稳定
应该是yum-fatestmirros吧
[ 本帖最后由 微宝贝 于 2008-11-22 06:37 编辑 ]
you_me 于 2008-11-21 23:50:41发表:
源的??!