1. 程式人生 > >把系統的yum源更換成aliyun的yum源

把系統的yum源更換成aliyun的yum源

使用linux系統的yum 安裝 lrzsz報以下錯誤

Loaded plugins: fastestmirror, refresh-packagekit, security

Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. </html>/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt

Error: Cannot find a valid baseurl for repo: base

發現原有的yum源不可用 改用aliyun的yum 

aliyun yum檔案配置網站 http://mirrors.aliyun.com/repo/

備份 

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back

下載配置檔案  
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

生成快取 
yum makecache