问题

使用yum安装软件时报错

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

解决方法

1、查看yum配置文件

vim /etc/yum.repos.d/CentOS-Base.repo

2、将原配置中的mirrorlist添加注释,并把baseurl删除注释使其生效,以base模块为例,其余模块同样处理

base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

发现还是不能生效,原因是baseurl链接mirror.centos.org已经没有资源

3、重新配置资源路径https://vault.centos.org/6.8/

修改后的配置

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=https://vault.centos.org/6.8/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=https://vault.centos.org/6.8/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=https://vault.centos.org/6.8/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=https://vault.centos.org/6.8/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
baseurl=https://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

4、清理缓存

yum clean all
rm -rf /var/cache/yum
yum makecache

再次运行

Centos6.8 yum报错及修复YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid的更多相关文章

  1. YumRepo Error: All mirror URLs are not using ftp, http[s] or file

    有台机器使用Yum的时候,报错如下: YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. $releaseve ...

  2. 关于YumRepo Error: All mirror URLs are not using ftp......报错的解决方法

    https://blog.csdn.net/u013999945/article/details/69942941 解决了我的问题

  3. YumRepo Error: All mirror URLs are not using

    yum 安装软件出错,最后发现是网络被拦截导致.

  4. Centos6版本使用yum报错 Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfi Setting up Install Process No package gcc available. Error: Nothing to do

    在使用Centos6版本yum时报错 Loaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds ...

  5. yum报错: Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

    在Centos 5.x或6.x上安装RHEL EPEL Repo repository,资源库,源的意思.RHEL EPEL(Extra Packages for Enterprise Linux)  ...

  6. 运行yum报错Error: Cannot retrieve metalink for reposit

    http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for reposit 今天给Centos通过rpm - ...

  7. 转:运行yum报错Error: Cannot retrieve metalink for reposit

    http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for repository: epel. Please ...

  8. 解决yum 不能更新问题 :yum 报错Loaded plugins: fastestmirror, refresh-packagekit, security

    2018-07-02       21:43:13 Yum报错 [root@db yum.repos.d]# yum makecache Loaded plugins: fastestmirror, ...

  9. Centos7.0安装python2.7后yum报错

    yum报错: vi /usr/libexec/urlgrabber-ext-down 把头部的Python改成和/usr/bin/yum中一样的

随机推荐

  1. python学习笔记(八)-模块

    大型python程序以模块和包的形式组织.python标准库中包含大量的模块.一个python文件就是一个模块.1.标准模块 python自带的,不需要你安装的2.第三方模块 需要安装,别人提供的. ...

  2. 51nod1229-序列求和V2【数学,拉格朗日插值】

    正题 题目链接:http://www.51nod.com/Challenge/Problem.html#problemId=1229 题目大意 给出\(n,k,r\)求 \[\sum_{i=1}^ni ...

  3. bzoj#4722-由乃【倍增,抽屉原理,bitset】

    正题 题目链接:https://darkbzoj.tk/problem/4722 题目大意 给出一个长度为\(n\)的序列值域为\([0,v)\),要求支持操作 询问一个区间能否找到两个没有交的非空下 ...

  4. P3288-[SCOI2014]方伯伯运椰子【0/1分数规划,负环】

    正题 题目链接:https://www.luogu.com.cn/problem/P3288 题目大意 给出\(n\)个点\(m\)条边的一张图,没条边\(i\)流量为\(c_i\),费用是\(d_i ...

  5. P4756-Added Sequence【斜率优化】

    正题 题目链接:https://www.luogu.com.cn/problem/P4756 题目大意 给出序列\(a\),设\(f(l,r)=|\sum_{i=l}^ra_i|\). \(m\)次询 ...

  6. P3273-[SCOI2011]棘手的操作【线段树,并查集】

    正题 题目链接:https://www.luogu.com.cn/problem/P3273 题目大意 \(n\)个点有权值,要求支持操作 连接两个点 单点加权 联通块加权 全图加权 单点询问 联通块 ...

  7. Fiddler抓HTTPS接口数据,安装证书并不复杂,超详细的图文解说,不信你看!

    @ 目录 前言 安装环境 配置网络 IP 端口 配置网络 浏览器打开下载链接 下载证书 安装证书 证书安装坑 前言 抓包是我测试工作中必须要学会的一个工具,我们都知道,抓取HTTPS接口里需要安装证书 ...

  8. DIVIDEMIX: LEARNING WITH NOISY LABELS AS SEMI-SUPERVISED LEARNING

    论文阅读: DIVIDEMIX: LEARNING WITH NOISY LABELS AS SEMI-SUPERVISED LEARNING 作者说明 版权声明:本文为博主原创文章,遵循CC 4.0 ...

  9. 关于VS中的无法解析的外部符号问题

    利用caffe的源码编译出的caffe.lib静态链接库里面就包含了源码里面的那些函数的接口i,所以如果在程序中使用的是源码的话,就不需要在链接器里面再添加此静态链接库了 对于无法解析的外部符号,首先 ...

  10. NOIP模拟76

    前言 还有不到 10 天就要 CSP-S ...马上我就要有我的第一篇游记了. 今天考试莽了一回,整了大概 2.5h 的 T1 ,可能是因为今天题目比较难,看起来成效不错. 以后还是要注意时间的分配( ...