• CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,报Errors during downloading metadata for repository ‘epel‘:


    CentOS8使用putty安装MySQL时搜不到(无法下载)元数据,

    报Errors during downloading metadata for repository 'epel': - Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml等错误,具体如下:

        

    这可能是配置yum源的问题,需要切换源

     

    正确解决流程可以参考下面链接博主的步骤:

    【完美解决】【Centos8】Linux 为 repo ‘AppStream‘ 下载元数据失败、Could not resolve host: mirrors.cloud.aliyuncs.com_AspirinZjh的博客-CSDN博客

     在这里对其执行过程简单介绍:


    运行以下命令备份之前的repo文件。
    rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo

     

    运行以下命令下载最新的repo文件
    wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
    wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo

     

    运行以下命令替换repo文件中的链接,就是这一步出错了,官方提供的命令:

    1、sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g'  /etc/yum.repos.d/Centos-vault-8.5.2111.repo &&  sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo

    2、sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo

    http://mirrors.cloud.aliyuncs.com需要替换为http://mirrors.aliyun.com,但是官方提供的命令没替换完,如果有执行官方提供的命令还是不行的话执行下面的命令:

    sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/Centos-vault-8.5.2111.repo 
    sed -i 's/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g'  /etc/yum.repos.d/epel-archive-8.repo

    运行以下命令重新创建缓存
    yum clean all && yum makecache

     

    执行成果,yum install也可以正常使用了

     转自:https://blog.csdn.net/qq_51515673/article/details/124273515
  • 相关阅读:
    linux消息队列相关操作
    linux下删除3分钟之前指定文件夹下的指定类型文件
    centos6.5安装gmime-2.6
    centos6.5安装filezilla
    posix 正则库程序
    nginx正向vs反向代理
    AbstractQueuedSynchronizer 原理分析
    JAVA NIO详解
    java NIO原理及实例
    Thread类详解
  • 原文地址:https://www.cnblogs.com/javalinux/p/16421945.html
Copyright © 2020-2023  润新知