Could not resolve host: mirrorlist.centos.org

yum安装软件的时候提示这个

复制代码
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=<repoid> ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable <repoid>
        or
            subscription-manager repos --disable=<repoid>

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: centos-openstack-train

主要是这个

复制代码
Could not resolve host: mirrorlist.centos.org

解决:

复制代码
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-OpenStack-train.repo
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-OpenStack-train.repo

参考链接:https://stackoverflow.com/questions/78692851/could-not-retrieve-mirrorlist-http-mirrorlist-centos-org-release-7arch-x86-6

相关推荐
程序员-Benothing4 小时前
Linux安全加固指南:账号、权限、服务、审计基线
linux·运维·安全
Mininglamp_27184 小时前
接口调用 vs 屏幕理解:两种 GUI 自动化架构的技术取舍
运维·架构·自动化
爱喝水的鱼丶6 小时前
SAP-ABAP:ECC→S/4HANA ABAP 迁移升级指南——程序改造、语法兼容与性能优化 导语
运维·开发语言·性能优化·sap·abap·经验交流·开发交流
木子欢儿6 小时前
openconnect Linux客户端安装 以及开机自启和登录
linux·运维·服务器
..Dauntless..7 小时前
【Linux】文件系统(一)
linux·运维·服务器
天空属于哈夫克37 小时前
企业微信API二次开发 赋能私域运营自动化
运维·自动化·企业微信
天远API7 小时前
零信任架构实战:基于天远运营商二要素V即时版构建自动化分时租赁出行会员身份一致性审核网关
运维·人工智能·架构·自动化
极光通讯8 小时前
液冷服务器对内存和SSD的适配要求:高密度部署下的散热与信号完整性
运维·服务器
2501_937767169 小时前
面向设计 / 研发部门:终端文件统一归档 + 服务器定时备份实践
运维·安全
GeW9 小时前
新质生产力路线图:从Linux到数据库,企业落地要点都在这
linux