zoukankan      html  css  js  c++  java
  • yum源中$releasever不能被系统识别

    一、现象

    使用yum makecache命令时报错

    [root@MiWiFi-R3L-srv ~]# yum makecache
    Loaded plugins: fastestmirror
    Repository base is listed more than once in the configuration
    Repository updates is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    http://mirrors.aliyun.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
    Trying other mirror.
    To address this issue please refer to the below wiki article 

    二、原因

    1. yum中的变量$releasever是由/etc/yum.conf中的distroverpkg定义的
    2. “distroverpkg=centos-release”  #将 $releasever设置为centos-release 这个RPM包的版本号
    3. centos-release是一个rpm包(通过:rpm可以查询到该软件包并没有被安装)
      rpm -q centos-release

    三、解决方案

    1. 由于$releasever无法被识别,无法使用yum安装,可以修改yum源文件,把$releasever全部替换为7(注意先备份源文件)
    2. 通过yum安装centos-release
      yum install centos-release -y
    3. 用备份的yum源文件覆盖修改的yum源文件

    参考地址:

    https://www.jianshu.com/p/925960eaeb21

    https://www.repo.cloudlinux.com/cloudlinux/migrate/release-files/centos/7/x86_64/

  • 相关阅读:
    基本样式
    表单基础知识
    边框内圆角
    灵活的背景定位
    多重边框
    半透明边框
    变量关系
    闭包2——闭包与变量
    闭包
    基本包装类型
  • 原文地址:https://www.cnblogs.com/jayce9102/p/12327472.html
Copyright © 2011-2022 走看看