Transaction check error: file /usr/bin/kubectl from install of kubectl-1.23.4-0.x86_64 conflicts

安装k8s时遇到的问题:

# yum -y install kubectl

提示如下:

已加载插件:fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 kubectl.x86_64.0.1.23.4-0 将被 安装
--> 解决依赖关系完成

依赖关系解决

=================================================================================================================================================
 Package                          架构                            版本                                 源                                   大小
=================================================================================================================================================
正在安装:
 kubectl                          x86_64                          1.23.4-0                             kubernetes                          9.5 M

事务概要
=================================================================================================================================================
安装  1 软件包

总计:9.5 M
安装大小:44 M
Downloading packages:
Running transaction check
Running transaction test


Transaction check error:
  file /usr/bin/kubectl from install of kubectl-1.23.4-0.x86_64 conflicts with file from package kubernetes-client-1.5.2-0.7.git269f928.el7.x86_64

错误概要
-------------

Transaction check error: file /usr/bin/kubectl from install of kubectl-1.23.4-0.x86_64 conflicts_第1张图片

问题原因:之前安装过导致版本冲突

解决办法:卸载后重装即可

# yum remove kubernetes-client-1.5.2-0.7.git269f928.el7.x86_64

Transaction check error: file /usr/bin/kubectl from install of kubectl-1.23.4-0.x86_64 conflicts_第2张图片

重装之后问题解决

# yum -y install kubectl

Transaction check error: file /usr/bin/kubectl from install of kubectl-1.23.4-0.x86_64 conflicts_第3张图片

 

你可能感兴趣的:(容器技术,linux,服务器,docker)