最近CentOS 6已經停止更新支持,同時官方也把yum源刪除了,目前CentOS 6系統使用yum命令安裝軟件包基本都是失敗,因此需要更換yum源。
在ssh界面執行以下命令即可一鍵更換yum源為CentOS的Vault源(包括CentOS官方和阿里雲的源):
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://file.kangle.odata.cc/repo/Centos-6.repo
- wget -O /etc/yum.repos.d/epel.repo http://file.kangle.odata.cc/repo/epel-6.repo
- yum makecache
轉發於:https://www.chuanhanzi.cn/archives/152/