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

相关推荐
-Harvey2 小时前
ubuntu为Docker配置代理
linux·ubuntu·docker
thehunters2 小时前
win10 ubuntu 使用Android ndk 问题:clang-14: Exec format error
android·linux·ubuntu
Ven%3 小时前
如何让后台运行llamafactory-cli webui 即使关掉了ssh远程连接 也在运行
运维·人工智能·chrome·python·ssh·aigc
迷茫的小技术5 小时前
OSPF使能配置
运维·服务器·网络
soragui5 小时前
【Ubuntu】想知道怎么通过命令行查看笔记本电池健康程度吗?
linux·ubuntu·电脑
小学导航员6 小时前
centos服务器 /1ib64/libm.so.6: version “GLIBc 2.27’ not found 异常
linux·服务器·centos
揽星逐月酒微醺6 小时前
find 查找文件grep匹配数据
linux·运维·服务器
银河麒麟操作系统6 小时前
【银河麒麟高级服务器操作系统】服务器异常重启故障分析及处理建议
linux·运维·服务器·安全·电脑
Codeking__6 小时前
Linux初识——基本指令
linux·运维·服务器
CodeJourney.6 小时前
Linux 基础应用指南:从入门到实践
linux