CentOS6使用yum安装服务报错

Posted Parker@1989

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6使用yum安装服务报错相关的知识,希望对你有一定的参考价值。

今天发现在CentOS6的服务器上,使用yum安装软件报错:

Loaded plugins: fastestmirror, security
Determining fastest mirrors
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

因为centos6已停止支持,所有centos的软件仓库也已经不能使用了
解决方法:

sed -i.old -e 's/^mirrorlist/#mirrorlist/g' -e 's/^#baseurl=http:\\/\\/mirror.centos.org\\/centos\\/$releasever\\//baseurl=http:\\/\\/vault.centos.org\\/centos\\/6\\//g' /etc/yum.repos.d/CentOS-Base.repo
yum clean all

以上是关于CentOS6使用yum安装服务报错的主要内容,如果未能解决你的问题,请参考以下文章

centos6系统yum安装报错The requested URL returned error: 404 Not Found

Navicat连接centos6.5报错2003和1130

CentOS6.5安装之DNS配置错误,yum install 软件报错:ERROR 6或者56错误提示”could not retrieve mirrorlist http://mirrorli(代

centos6.4下yum报错实例

centos6.10下通过yum安装mysql数据库

Centos6.7上yum安装jdk1.8的JAVA_HOME