Ubuntu 18.04.1安装k8s的时候,提示缺少依赖包kubernetes-cni (= 0.7.5)

风流不在谈锋胜,袖手无言味最长。这篇文章主要讲述Ubuntu 18.04.1安装k8s的时候,提示缺少依赖包kubernetes-cni (= 0.7.5)相关的知识,希望能为你提供帮助。
root@k8s-master:~# apt-get install kubelet=1.13.5-00   kubeadm=1.13.5-00

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.7.5)
kubelet : Depends: kubernetes-cni (= 0.7.5)
E: Unable to correct problems, you have held broken packages.

配置的kubernetes源是:配置的阿里云的源
??https://developer.aliyun.com/mirror/kubernetes?spm=a2c6h.13651102.0.0.aefa1b11zNDeDY??

搞了半天,各种网上查询,终于,终于,终于找到了解决办法[不容易啊]。
参考链接:??https://blog.csdn.net/u013355826/article/details/89557989??
参考链接的文档,是centos系统;注意:centos系统与ubuntu系统的版本号有所区别
如果你直接:apt-get install kubernetes-cni安装,它安装的是最新的;所以你需要指定安装版本号
解决办法:
1.列出版本号
apt-cache madisonkubernetes-cni

【Ubuntu 18.04.1安装k8s的时候,提示缺少依赖包kubernetes-cni (= 0.7.5)】
2.安装相应版本
apt-get install kubernetes-cni = 0.7.5-00

最后;感觉提供帮助的网友小伙伴!!!

    推荐阅读