首页 > 系统相关 >centos7 Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

centos7 Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

时间:2023-08-04 14:46:48浏览次数:44  
标签:epel EPEL retrieve https try yum aliyun com

 

  1. 备份原始的 EPEL 存储库配置文件(可选):在更改前,建议您先备份原始的 EPEL 存储库配置文件,以便在需要时恢复到默认设置。在终端中执行以下命令备份:

    sudo cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
  2. 编辑 EPEL 存储库配置文件:使用文本编辑器(例如 nano 或 vi)编辑 EPEL 存储库配置文件 /etc/yum.repos.d/epel.repo

    sudo nano /etc/yum.repos.d/epel.repo
  3. 在编辑器中将原来的镜像源地址注释或删除,然后添加阿里云 EPEL 镜像源地址:

    [epel] name=Extra Packages for Enterprise Linux 7 - $basearch baseurl=https://mirrors.aliyun.com/epel/7/$basearch gpgcheck=1 gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7 enabled=1 [epel-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug baseurl=https://mirrors.aliyun.com/epel/7/$basearch/debug gpgcheck=1 gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7 enabled=0 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source baseurl=https://mirrors.aliyun.com/epel/7/SRPMS gpgcheck=1 gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7 enabled=0

    请注意,上述配置是适用于 CentOS 7 的配置。如果您使用的是其他版本的 CentOS,请替换对应的版本号。

  4. 保存更改:按下 Ctrl + O,然后按下 Enter 来保存更改。

  5. 退出编辑器:按下 Ctrl + X 来退出编辑器。

  6. 清除旧的缓存:在更改镜像源后,需要清除旧的缓存以便于重新生成:

    sudo yum clean all
  7. 生成新的缓存:执行以下命令来生成新的缓存,以便 yum 使用阿里云的 EPEL 镜像源:

    sudo yum makecache

标签:epel,EPEL,retrieve,https,try,yum,aliyun,com
From: https://www.cnblogs.com/jack123/p/17605874.html

相关文章

  • 使用 OpenTelemetry 监控 Spring Boot
    通过将OpenTelemetry与SpringBoot集成,您可以从应用程序捕获分布式跟踪和其他遥测数据,从而提供有关其在分布式环境中的性能和行为的宝贵见解。什么是开放遥测?OpenTelemetry定义了用于收集遥测数据(例如指标、跟踪和日志)的API和协议,并为流行的编程语言和技术提供了各种库、代理......
  • CentOS使用yum安装包报错No more mirrors to try解决方法
    报错如下Loadedplugins:fastestmirror,update-motdLoadingmirrorspeedsfromcachedhostfilehttp://mirrors.163.com/centos/7-7.1908.0.el7.centos/os/x86_64/repodata/repomd.xml:[Errno14]HTTPError404-NotFoundTryingothermirror.Toaddressthisissue......
  • tkinter的Entry设置默认值的效果
    用Python的tkinter库做GUI程序,Entry控件被我们用来获取用户的输入,不过很多时候,我们希望GUI界面上的Entry控件能有默认值,用户可以修改默认值,也可以不修改。默认值提高了软件的易用性。直接看代码:importtkinterastkroot=tk.Tk()lb=tk.Label(root,text='网址:')lb.grid......
  • 代码里如何try catch
    提问代码里如何trycatch回答使用专门的函数进行trycatch;try中只有一行;参考反思这样会使含数量翻倍,同时做了很多重复工作;我现在设想使用sourcegenerator进行代码自动生成,在需要trycatch的代码上进行特性标注;这样可以节省成吨的代码,让开发人员专心于业务现命名为tryC......
  • 01、spdlog源码阅读——registry注册表
    注册表具有唯一标识,用于管理多个日志//Copyright(c)2015-present,GabiMelman&spdlogcontributors.//DistributedundertheMITLicense(http://opensource.org/licenses/MIT)#pragmaonce//Loggersregistryofuniquename->loggerpointer//Anattempttocr......
  • Golang gRPC学习(05): retry重试
    什么是重试如果服务出现了错误,主要是网络,服务器出现了短暂异常的时候,该怎么办?我们都会人工或者自动的重新连接服务试试,看服务是否恢复可用了。这种重新进行连接服务的一种方式就是重试。如果是在微服务里,应该属于微服务治理的范畴。重试是处理网络服务出现暂时不可用的一种方......
  • docker compose 更新报错 permission denied while trying to connect to the docker
    今天更新签到docker的时候输入了#先cd到docker-compose.yml所在目录,执行命令后重启容器dockercomposepull&&dockercomposeup-d结果发现permissiondeniedwhiletryingtoconnecttothedockerdaemonsocket后来上网搜了一下应该是权限不够的原因,所以先执......
  • 前端异常监控之 Sentry的部署和使用
    由于最近在整理前端异常监控相关内容,所以自己在虚拟机搭建部署了一下Sentry,把搭建过程及一些自己踩得坑整理如下一、Sentry部署Sentry搭建有两种方式:通过Python安装教程地址通过Docker容器安装教程地址我本地是用Docker进行搭建的。1、安装docker armasm复制......
  • The Rising Importance of Automotive Diagnostic Tools in the Repair Industry
    TheRisingImportanceofAutomotiveDiagnosticToolsintheRepairIndustryIntheever-evolvingautomotiveworld,continuousadvancementsintechnologyhavebroughtmajorchangestothewayvehiclesarediagnosedandrepaired.Automotivediagnostictools......
  • 安装 Sentry On-Premise 后,忘记了初始用户密码
    在安装部署SentryOn-Premise的过程中,经常遇到这样一种情况:按照 SentryOn-Premise官方文档部署说明,输入对应的命令,出现交互提示时,没仔细看,回车回车回车,部署完成;然后,在登录sentryweb,发现忘记初始用户密码。遇到这种情况的人还蛮多,当然也包括我。本文主要针对这种情况,记录一......