Cychin Net

a Chin's 生活雜記!

CentOS 8 無法更新調整

by Alex on 2022 年 02 月 12 日

CentOS Linux 8 已經發佈於2021/12/31 停止支援與更新,以致在更新的時候會出現錯誤,我們可以修改mirror 的位置,使其繼續更新,修改如下:

步驟ㄧ:移動到YUM的 repo 目錄下

[root@localhost~]#cd /etc/repos.d/

步驟二:修改啟用mirror位置更新,並調整更新位置為:vault.centos.org

[root@localhost~]#sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*

[root@localhost~]#sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-*

步驟三:執行更新

[root@localhost~]#yum -y update

以上即可更新。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

* Copy This Password *

* Type Or Paste Password Here *