kubernetes: kubelet dependency to kubernetes-cni failure

/kind bug /sig architecture

What happened: When trying to install kubelet I got the following error: kubelet : Depends: kubernetes-cni (= 0.5.1) but 0.6.0-00 is to be installed

What you expected to happen: The dependency should be resolved by the kubelet package itself, but I get the error.

How to reproduce it (as minimally and precisely as possible): Remove kubernetes-cni from your Ubuntu 16 machine and run “apt install kubelet=1.8.5*”

Anything else we need to know?:

  • When I install kubernetes-cni in version 0.5.1 by myself, it works, but usually this should work out of the box.
  • apt-cache policy kubernetes-cni only shows “0.5.1-00”

Environment:

  • Kubernetes version: 1.8.5
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.1 LTS (Xenial Xerus)
  • Kernel: 4.4.0-31-generic
  • Install tools: apt

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 24 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I think this issue should reopen because of last night update Fri, 05 Oct 2018 23:13:00 UTC you can see the update date link below; https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Release

New version of kubernetes-cni debian package repo has been updated/added but kubeadm and kubectl are not. That’s why it doesn’t work because apt-get wants to install the latest version. That’s why it doesn’t work. If someone remove 0.6.0-02 version from release list I think installation will work

here is packages list; https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Packages

$ apt-get update && apt-get install -y kubeadm kubelet kubectl

Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 kubeadm : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
 kubelet : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
E: Unable to correct problems, you have held broken packages.

Temporary workaround:

apt-get install kubernetes-cni=0.6.0-00

Please re-open this, its still an issue:

$ sudo apt-get update && sudo apt-get install --reinstall -y kubelet kubeadm
...
The following packages have unmet dependencies:
 kubeadm : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
 kubelet : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed

It is happening because, kubernetes-cni lates version is 0.6.0-02 which is incompatible with kubeadm and kubelet. it can be solved by installing specific version of kubernetes-cni that is 0.6.0-00. Command: apt-get install kubernetes-cni=0.6.0-00

Solution found here: http://jee-appy.blogspot.com/2018/10/kubelet-depends-kubernetes-cni-060-but.html

Still happening on ubuntu xenial:

root@master:~# apt-get update && apt-get install -y --allow-unauthenticated kubeadm kubelet kubectl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 kubeadm : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
 kubelet : Depends: kubernetes-cni (= 0.6.0) but 0.6.0-02 is to be installed
E: Unable to correct problems, you have held broken packages.

This issue is affecting me too. The fix mentioned in this comment above is working.

This bug was fixed long time ago.