zoukankan      html  css  js  c++  java
  • 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. $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我还不清楚,懂了之后补上。

  • 相关阅读:
    简单记录下springboot+jms+activemq
    简单记录下RestTemplate 中postForObject调用例子
    vue+springboot后台实现页面按钮权限
    发送短信功能
    drf
    drf
    drf
    drf
    drf
    drf
  • 原文地址:https://www.cnblogs.com/solohac/p/4308997.html
Copyright © 2011-2022 走看看