有台机器使用Yum的时候,报错如下:

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

猜测:

1.DNS问题

2. $releasever 取不到

1.改了DNS后测试,仍然有问题

2.查看/etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

由于yum读取mirrorlist的时候,$releasever取不到,导致url访问失败。

那么解决方法也简单,要么把$releasever弄好,

要么直接修改CentOS-Base.repo文件,替换$releasever为6。(因为我的是centos6)。

怎么修复$releasever我还不清楚,懂了之后补上。

YumRepo Error: All mirror URLs are not using ftp, http[s] or file的更多相关文章

  1. Centos6.8 yum报错及修复YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid

    问题 使用yum安装软件时报错 YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid relea ...

  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. Error : Must specify a primary resource (JAR or python or R file)

    spark-submit 报错:must specify resource 取消关注 | 1 ... 我的submit.sh内容: /bin/spark-submit \ --class abc.pa ...

  5. 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

    运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...

  6. ERROR 23 (HY000) at line 29963: Out of resources when opening file

    在还原数据库时报错,报错信息如下:(库中的表比较多) ERROR 23 (HY000) at line 29963: Out of resources when opening file 解决方法: ...

  7. OpenGL开发时,fatal error C1083: 无法打开包括文件:“gl\glut.h”: No such file or directory

    本人使用的是vs2012,编写一个简单的opengl程序,运行的时候总是提示: fatal error C1083: 无法打开包括文件:“gl/glut.h”: No such file or dir ...

  8. Error copying image in the datastore: Not allowed to copy image file

    opennebula error copying image in the datastore not allowed to copy image file Error copying image i ...

  9. sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file

    sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file 1. 权限问题 ...

随机推荐

  1. abs 暴力

    Given a number x, ask positive integer y≥2y≥2, that satisfy the following conditions: 1. The absolut ...

  2. [Jest] Automate your migration to Jest using codemods

    Jest is a fantastic testing library, but maybe you've been putting off the switch because migrating ...

  3. ios学习8_KVC和字典转模型

    Key Value Coding是cocoa的一个标准组成部分,它能让我们能够通过name(key)的方式訪问属性,某些情况下极大地简化了代码.可称之为cocoa的大招. 例如以下的样例: 使用KVC ...

  4. lua遍历目录

    require"lfs" function findindir (path, wefind, r_table, intofolder) for file in lfs.dir(pa ...

  5. REST技术第二步 获取URL中的參数

    获取请求的參数.rest技术相对于servlet来说要方便很多. Servlet我们要获取请求的參数,非常麻烦啊.须要request.getParameter("").假设我们要的 ...

  6. python包格式

    1 egg和wheel 前者扩展名是.egg,后者扩展名是.whl 它们都是python的模块.后者用来替换前者. wheel是轮子的意思,就是说,有了.whl包就不需要重新再造轮子了.

  7. mongodb配置复制集replset

    Mongodb的replication主要有两种:主从和副本集(replica set).主从的原理和mysql类似,主节点记录在其上的所有操作oplog,从节点定期轮询主节点获取这些操作,然后对自己 ...

  8. CPU卡详解【转】

    本文转载自:http://blog.csdn.net/logaa/article/details/7571805 第一部分 CPU基础知识 一.为什么用CPU卡 IC卡从接口方式上分,可以分为接触式I ...

  9. Called attach on a child which is not detached

    问题:Called attach on a child which is not detached: ViewHolder#出现问题的原因 经过google后发现,出现该问题的原因是由于recycle ...

  10. Tensorflow学习笔记——占位符和feed_dict(二)

    创建了各种形式的常量和变量后,但TensorFlow 同样还支持占位符.占位符并没有初始值,它只会分配必要的内存.在会话中,占位符可以使用 feed_dict 馈送数据. feed_dict是一个字典 ...