[精讚] [會員登入]

[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

你可能有興趣

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

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

[vi/vim] 取代時,把字串取代為換行字元

vi把一個字串換成換行,感覺很簡單的操作,我失敗了,原來…

[Centos7] 開機後會執行的程序 /etc/rc.local

把開機完畢要執行的script 放這裡,類似windows的autoexec.bat

[Gigapixels] 學校一隅

這是新相機的第一次拍攝,效果令我滿意

[Gigapixels] 再眺台中市

只是小小的作品

[Gigapixels] 建功嶼眺小金門

接近傍晚的時間,跨走過還沒退的水路到了建功嶼往小金門方向拍攝。