yum install lrzsz出错

[root@centos ~]# yum install lrzsz
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txt
错误:Cannot find a valid baseurl for repo: base

 

翻译后

[root@centos ~]# yum install lrzsz

已加载插件:fastestmirror refresh-packagekit,安全

设置安装进程

从缓存的主机文件加载镜像速度

YumRepo错误:所有的镜像url都不使用ftp, http[s]或文件。

如。无效的发布/回购/拱组合

删除没有有效镜像的镜像:/var/cache/yum/i386/6/base/mirrorlist.txt

错误:找不到一个有效的baseurl回购:基地

 

 

 

一般系统默认是从国外的仓库拉取数据,失败率很高,可以考虑将yum源更改为国内的源,更新方法如下。 

1、先备份

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

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

你系统版本是哪个就用哪个 

CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、添加EPEL

CentOS 6
wget -O /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo
CentOS 7
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

4、清理缓存并生成新的缓存

yum clean all
yum makecache