[精讚] [會員登入]

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

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

分享完整連結 //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

END
你可能有興趣

[Rocky9] 安裝node.js 18, node.js 20

原本的nodejs16在使用 quasar dev時出現錯誤,得升級成18版以上

[SSL] Could not read certificate from server.cer 的錯誤排除

在轉換ssl憑證時,出現無法讀取的錯誤,可是怎麼看憑證都很正常,該怎麼解決?

[Linux] 如何能知道我是什麼時候安裝系統的?

linux想知道什麼時候裝系統的? 不必憑記憶。

地圖填色的網站

我們想為國家填色不需要小畫家,這個網站能幫助你

[Linux] 列出所有目錄及所占空間的方法

想知道目錄下的所有目錄所占的空間大小?

[Linux] grep 排除特定字串

使用 -v 參數可以讓grep排除特定字串的方法