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

相关推荐
SYHC_CSDN9 分钟前
RTL 仿真自动化新思路:HDLHorse 一键完成用例生成‑仿真执行‑报告输出
运维·fpga开发·自动化
qetfw25 分钟前
Debian 磁盘实验:RAID5、LVM 与 LUKS 分层及挂载验证
linux·运维·debian·raid
木心术134 分钟前
蜂窝基站 vs 非蜂窝基站:多维度技术对比与选型指南
运维·网络
IT小小猪44 分钟前
录音转文字做成流水线:一套规范 + 质检脚本 + 自动排版,34 分钟音频出 25 页 PDF
运维·人工智能·python
卓豪终端管理1 小时前
MDM 落地实战:一台设备从注册到退役的四道关
运维·网络·windows·安全
沫璃染墨1 小时前
从零入门计算机网络系列(三十三):Linux I/O 多路复用详解——epoll 核心接口、底层原理与事件通知机制
linux·运维·服务器·c++·驱动开发·系统架构·硬件架构
showker1 小时前
阿里云 CentOS 6 编译安装 PHP 8.5 完整指南
阿里云·centos·php
Rabitebla1 小时前
【Linux】文件系统(四):目录、路径解析与 dentry 缓存
linux·数据结构·c++·笔记·学习·算法·缓存
qq_171520351 小时前
nginx访问不同服务器docker部署的java服务上传文件地址
运维·服务器·nginx
爆米花byh1 小时前
在RockyLinux9环境下安装RustFS Server1.0.6单机版
linux·中间件