有台机器使用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. Centos samba install

    Ready Change Root Password passwd root 在提示下建立新密码 静态IP vi /etc/sysconfig/network-scripts/ifcfg-eth0  ...

  2. struts1与struts2的差别

     Struts 2是Struts的下一代产品,是在 struts 1和WebWork的技术基础上进行了合并的全新的Struts 2框架.其全新的Struts 2的体系结构与Struts 1的体系结 ...

  3. vue组件之间的通信,父子之间的数据通信

    父子组件之间的通信问题既可以传递数据也可以传递变量,父组件传递数据给子组件可以使用props,子组件传递数据给父组件则可以自定义函数来监听子组件的事件发射器. 首先说说组件注册,组件的注册分为全局注册 ...

  4. cocos2d-x 3.6版连连看版本号控制

    为了以后的开发和管理.源代码开发必须要使用版本号控制.我们当然选择git来做版本号控制了. 假设你在终端输入git,提示不是一个命令的话.那就说明你的机器没有安装git工具.那就安装一个,百度之有非常 ...

  5. C#在Linux下获取文件夹信息(所在磁盘总大小,使用空间,已用空间,使用率)

    1.第一种使用shell命令实现: private DiskInfo LinuxGetFolderDiskInfo(string path) { DiskInfo disk = new DiskInf ...

  6. Cocos2d-x 脚本语言Lua基本数据结构-表(table)

    Cocos2d-x 脚本语言Lua基本数据结构-表(table) table是Lua中唯一的数据结构.其它语言所提供的数据结构,如:arrays.records.lists.queues.sets等. ...

  7. ubuntu下apache+mysql+php+mysql等之webserver搭建

    相信非常多人跟我一样,想搭建一个自己的webserver.网上资料非常多.可是因为版本号的区别,总是存在依照一个教程来做无法全然实现的问题.近期我也折腾了好几天,google不能用,仅仅能百度,真想说 ...

  8. Android 录音和摄像头权限适配【转】

    本文转载自:http://blog.csdn.net/self_study/article/details/52965045 最近在研究权限适配的相关内容,整理以前的权限博客如下:  android ...

  9. 编译android framework的例子【转】

    本文转载自:http://blog.csdn.net/brucexu1978/article/details/7610358 在开发过程中,尤其是Framework相关开发时,有时候需要重新编译资源文 ...

  10. CPU卡的读写【转】

    本文转载自:http://blog.csdn.net/logaa/article/details/7465226 一般来说,对存储卡和逻辑加密卡操作,使用接触式IC卡通用读写器:对CPU卡使用CPU卡 ...