2012-09-09

Linux YUM站台格式修正

 Linux YUM站台格式修正


如果有新增YUM站台的朋友,最近UPDATE後可能會發生錯誤:

[root@msg ~]# yum -y update
Loading "fastestmirror" plugin
Config Error: File contains parsing errors: file://///etc/yum.repos.d/CentOS-Base.repo
[line 56]: [dag] [About 4052 Packages]
[line 63]: [dries] [About 2825 Packages]
[line 70]: [kbs-CentOS-Extras] [About 0 Packages]
[line 77]: [kbs-CentOS-Misc] [Not Ready]
[line 84]: [kbs-CentOS-Misc-Testing] [Not Ready]
[line 91]: [c5-testing] [About 80 Packages]

目前是發現更新到下列版本時會發生
yum.noarch 3.2.8-9.el5.centos.2.1
yum-updatesd.noarch 1:0.9-2.el5
yum-fastestmirror.noarch 1.1.10-9.el5.centos

發生錯誤的原因是在於站台名稱變的只容許第一段的[dag]、[dries]、[kbs-CentOS-Extras]、[kbs-CentOS-Misc]、[kbs-CentOS-Misc-Testing]、[c5-testing],後面註記的[About 4052 Packages]、[About 2825 Packages]、[About 0 Packages]、[Not Ready]、[Not Ready]、[About 80 Packages]必須刪除或是#處理掉,修改後的站台成為(For CentOS 5):

[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
gpgcheck=1
enabled=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt


[dries]
name=Extra CentOS rpms dries - $releasever - $basearch
baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el5/en/i386/dries/RPMS
gpgcheck=1
enabled=0
gpgkey=http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt


[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stable
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/
gpgcheck=1
enabled=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt


[kbs-CentOS-Misc]
name=CentOS.Karan.Org-EL$releasever - Stable
baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/
gpgcheck=1
enabled=0
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt


[kbs-CentOS-Misc-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
baseurl=http://centos.karan.org/el$releasever/misc/testing/i386/RPMS/
gpgcheck=1
enabled=0
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt


[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing


出自 唉呦 ~ MIS先生 

沒有留言:

張貼留言