场景
安装了一台Linux虚拟机充当服务器,准备搭建一个elk环境,我使用命令安装docker的时候,报错提示
java
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/x86_64/6/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
解决
使用命令到 /etc/yum.repos.d/CentOS-Base.repo下面,然后编辑
java
[base]
name=CentOS-6.5
baseurl=http://mirrors.aliyun.com/centos-vault/6.5/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6
#发布的更新
[updates]
name=CentOS-6.5
baseurl=http://mirrors.aliyun.com/centos-vault/6.5/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6
#导入一些可能会用到的包
[extras]
name=CentOS-6.5
baseurl=http://mirrors.aliyun.com/centos-vault/6.5/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://vault.centos.org/RPM-GPG-KEY-CentOS-6
随后再次安装提示成功
结束
记录一下,以后如有需要,回来阅读。