Score:-1

cannot install both kubelet-1.18.4-0.x86_64 and kubelet-1.21.3-0.x86_64

cn flag
[root@centos1 ~]# yum -y update
Ultima verifica della scadenza dei metadati: 8:14:04 fa il dom 01 ago 2021 19:20:32 EDT.
Errore:
 Problema: cannot install both kubelet-1.18.4-0.x86_64 and kubelet-1.21.3-0.x86_64
  - cannot install the best update candidate for package kubernetes-cni-0.8.7-0.x86_64
  - cannot install the best update candidate for package kubelet-1.21.3-0.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Score:2
vn flag
rvs

This is a common problem there is either a bug in yum/dnf, or a bug in how Kubernetes repository is set up.

One workaround is to mask unneeded versions of kubelet. E.g. here's my /etc/yum.conf:

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
exclude = kubelet-1.18.* kubelet-1.17.* kubelet-1.16.*
Score:0
cz flag

Because you have conflicting packages, you should use --allowerasing to allow dnf to resolve the conflict.

dnf --allowerasing update

Don't use -y here; you want to inspect the output to ensure that it makes sense before installing.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.