【问题标题】:Unable to access knife in chef无法在厨师中使用刀
【发布时间】:2013-10-01 14:37:59
【问题描述】:

我对厨师很陌生,正在努力学习它。我已经在我的系统上安装了 chef-client,复制了我的 chef-repo 的 chef 目录中的 .pem 文件和 knife.rb 文件,现在我正在尝试访问 knife,但我收到了以下错误。谁能帮帮我?

prateek@prateek-desktop:~/mygit/chef-repo/chef$ knife client list -VV
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/path_sanity.rb:26:in `enforce_path_sanity': undefined method `split' for nil:NilClass (NoMethodError)
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/knife.rb:465:in `run_with_pretty_exceptions'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/knife.rb:173:in `run'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/knife.rb:123:in `run'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/knife:25:in `<top (required)>'
from /usr/bin/knife:23:in `load'
from /usr/bin/knife:23:in `<main>'

【问题讨论】:

  • 查看源代码,它在existing_paths = env["PATH"].split(path_separator) 行失败,这表明您没有定义 PATH 环境变量。
  • @JaredRussell 您应该将该评论作为答案。

标签: chef-infra chef-recipe chef-solo


【解决方案1】:

我解决了,我需要配置我的PATH环境变量:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-10
    • 1970-01-01
    相关资源
    最近更新 更多