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

相关推荐
三言老师4 小时前
K8s集群运行时自动化运维全覆盖落地实操(下)
linux·运维·服务器·网络
ltl5 小时前
HAProxy HTX 与 HTTP 路径:内部表示、改写落点与协议分叉
linux
ltl5 小时前
可拆分 OS:CXL 内存池化如何动摇本地 DRAM 假设
linux
ltl5 小时前
Tetragon 强制执行:Override 与 SIGKILL 各自保证什么
linux
lengjingzju6 小时前
编译与调试完全指南—第6章 性能分析工具
linux
躺不平的理查德7 小时前
嵌入式 Linux 系统移植与 SD 卡量产镜像制作
linux·运维·服务器
一直走下去-明8 小时前
centos7无法安装tcpreplay
linux·运维
吹什么轩8 小时前
linux网络:TCP套接字基础
linux·网络·tcp/ip
IT大白鼠8 小时前
n8n工作流自动化平台技术架构与应用价值评估
运维·架构·自动化·n8n
anxiao_m8 小时前
园区数字孪生怎么搭建?主流方案与服务商深度对比
大数据·运维·人工智能