10/01/2560

วิธีลบ epel-release.noarch ที่ลงเกิน Version (ปัญหาใช้งาน yum ไม่ได้)

ปัญหาที่พบคือ เมื่อนำ epel-release.noarch ของรุ่นที่ใหม่กว่ามาลงในรุ่นที่เก่ากว่า จะเกิดปัญหาไม่สามารถภ yum ได้ โดยจะมี Error ประมาณนี้
[root@chi ~]# yum update Loaded plugins: fastestmirror Setting up Update Process Loading mirror speeds from cached hostfile epel/metalink | 4.9 kB 00:00 * base: mirror1.ku.ac.th * epel: mirror01.idc.hinet.net * extras: mirror1.ku.ac.th * updates: mirror1.ku.ac.th * webtatic: uk.repo.webtatic.com epel | 4.3 kB 00:00 http://mirror01.idc.hinet.net/EPEL/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://mirror.rise.ph/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://repo.fedoralinux.ir/repos/centos/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 https://free.nchc.org.tw/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 https://mirrors.tuna.tsinghua.edu.cn/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 https://epel.mirror.angkasa.id/pub/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 https://mirrors.thzhost.com/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://mirrors.bestthaihost.com/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. epel | 4.3 kB 00:00 http://mirror2.totbb.net/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
เจอครั้งแรก ยังไม่เข้าใจ ยอมแพ้ ต้องลง OS ใหม่เลยทีเดียว พอหลาย ๆ ครั้งเริ่มจะเข้าใจ (ติดปัญหานี้ ตั้งแต่ 6 โมงเย็น ตอนนี้ ตีหนึ่งกว่าแล้ว) สามารถแก้ไขได้ตามนี้ครับ http://www.cyberciti.biz/faq/centos-redhat-fedora-linux-remote-yum-repo-configuration/ ตรวจสอบไฟล์ repo
# cd /etc/yum.repos.d/ # ls -l
จะพบ
-rw-r--r-- 1 root root 954 Aug 11 2010 epel.repo -rw-r--r-- 1 root root 1054 Aug 11 2010 epel-testing.repo -rw-r--r-- 1 root root 561 Dec 14 2010 rhel-debuginfo.repo -rw-r--r-- 1 root root 222 Dec 14 2010 rhel-source.repo -rw-r--r-- 1 root root 235 Jan 16 15:27 srpm.repo
สั่งลบ
# rm epel.repo epel-testing.repo ### ***************************** ### ### make sure you delete GPG keys also ### ### ***************************** ### # rm /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL # yum clean all
ตรวจสอบว่าเป็นรุ่นไหน แล้วก็การลบ
# [root@chi ~]# rpm -qa | grep epel epel-release-6-8.noarch [root@chi ~]# yum remove epel-release-6-8.noarch Loaded plugins: fastestmirror Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:6-8 will be erased --> Finished Dependency Resolution
แล้วทดสอบ ทำการ yum ใหม่อีกครั้ง คราวนี้จะสามารถใช้งานได้ตามปกติแล้วครับบ

ไม่มีความคิดเห็น:

แสดงความคิดเห็น