【问题标题】:Uninstalling chef-client卸载厨师客户端
【发布时间】:2016-03-21 22:47:49
【问题描述】:

我正在尝试在 Linux 环境 (RHEL 6.5) 中设置厨师服务器和工作站。我使用了 chef-server 版本 11.0.10 。在设置厨师工作站时,我安装了 12.3 版。

由于我在执行刀配置命令时遇到问题,我正在尝试卸载 chef-client 并安装版本 11.0.0。

我执行了以下命令来卸载 chef-client:

rpm -qa \*chef\*  
yum remove <package>

当我尝试安装 chef-client 11.0.0 时,出现如下错误:

from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/share/terminfo/x/xnuppc-144x48 from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/share/terminfo/x/xnuppc-144x48-m from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/share/terminfo/x/xnuppc-160x64 from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64

  file /opt/chef/embedded/ssl/misc/c_info from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/ssl/misc/c_issuer from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/ssl/misc/c_name from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/ssl/misc/tsget from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/embedded/ssl/openssl.cnf from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64
    file /opt/chef/version-manifest.txt from install of chef-11.0.0-1.el6.x86_64 conflicts with file from package chef-12.3.0-1.el6.x86_64

非常感谢任何解决此问题的建议。提前致谢。

【问题讨论】:

  • 你的机器上安装了 ruby​​ 和 ruby​​gems 吗?如果是,您可以运行gem uninstall chef -v &lt;version&gt;

标签: linux chef-infra


【解决方案1】:

我不是 rpm 专家,但似乎安装了另一个版本的软件包 (12.3.0)。

检查它是否属实,以及为什么安装它,可能会让您遇到问题。

【讨论】:

  • 我已经安装了 12.3.0 版本的包。但我卸载了它。我仍然收到此错误。
  • 我能够使用以下命令卸载 12.3.0 版:> yum erase chef
【解决方案2】:

我能够使用 -e 标志完全删除厨师包。

试试:

rpm -e packagename 

【讨论】: