执行命令
yum install --setopt=obsoletes=0 kubeadm-1.17.4-0 kubelet-1.17.4-0 kubectl-1.17.4-0 -y
报错
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
Parsing primary.xml error: Document is empty
可能刚配置的文件没有生效
解决过程
1.执行
yum clean all
yum clean all 是一个在 Linux 系统中的 yum 命令,它的作用是清除系统中所有缓存的 RPM 包。具体而言,该命令会删除以下四种类型的缓存:
已下载但未安装的 RPM 包
软件仓库中的元数据和头文件等信息
旧版本的已安装 RPM 包
失效的软件仓库配置
通过执行 yum clean all 命令可以释放一些磁盘空间,并且可以确保您在运行 yum 命令时获取最新的软件包列表和信息。
2.执行
yum makecache
yum makecache 是一个命令行指令,用于更新缓存中的 Yum 软件包元数据。当 Yum 安装新软件时,它会下载软件包的元数据并将其存储在本地缓存中。这些元数据包含软件包的名称、版本和依赖项等信息。使用 yum makecache 命令,可以强制刷新本地缓存中的元数据信息,以确保您获取到最新的软件包信息,并为之后的软件包安装做好准备。
参考:https://blog.csdn.net/XiaoYeZiQin/article/details/128299748

554

被折叠的 条评论
为什么被折叠?



