[精讚] [會員登入]

[CentOS5] 解決yum 停止支援的問題

這近要用yum更新套件時,發現不能更新。 OS # lsb_release -a LSB Version: :core-

此文完整連結 http://n.sfs.tw/m10327

複製連結 [CentOS5] 解決yum 停止支援的問題@精讚
(文章歡迎轉載,請尊重版權註明連結來源)
2017-06-11 02:07:44 By 瘦河馬

這近要用yum更新套件時,發現不能更新。

OS

# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.8 (Final)
Release:        5.8  <==太舊了
Codename:       Final

# yum install package
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

我以為是我的yum 壞掉了,到repository去看才知道是停止支援。該版本的目錄還在,只是沒檔案,留了一個字條:

This directory (and version of CentOS) is depreciated. CentOS-5 is now past EOL You can get the last released version of centos 5.11 here: http://vault.centos.org/5.11/ Please NOTE: this is not being maintained for security since moving to Vault. It will have security issues, you should upgrade to a new version instead.

好的,至少還有「遺跡」可以用。

修改

# vi /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/5.11/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/5.11/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/5.11/extras/$basearch/

gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

把原本的註解或刪掉,加上上面黃色的。

勉強能用

[相關連結]

http://blog.sina.com.cn/s/blog_541a3cf10101h245.html

你可能有興趣

消一行都很難的俄羅斯方塊

這真是很虐人的俄羅斯方塊,不騙你要消一行都很難

有創意的廢物收集盒

在老家發現的廢物收集盒,實在太有創意了

[LINUX] 一次刪除所有背景程序

想要一次刪除所有背景程序

膳魔師 ths-1500-cbw 保溫壺蓋拆洗方法

膳磨師 ths-1500-cbw 保溫壺蓋拆洗方法

Linux上強制cp複製不詢問的方法

cp forced copy 強制複製不詢問