厨师独奏 - 流浪汉建立错误

时间:2014-05-14 11:25:19

标签: vagrant chef chef-solo berkshelf

我已经挣扎了几个小时,似乎没有取得任何进展。关于我应该开始调试的任何提示都将不胜感激。

我正在尝试配置一个流浪汉机器并收到以下错误。

`==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2014-05-14T11:16:08+00:00] INFO: *** Chef 10.14.2 ***
==> default: [2014-05-14T11:16:08+00:00] INFO: Setting the run_list to ["recipe[nginx]"] from JSON
==> default: [2014-05-14T11:16:08+00:00] INFO: Run List is [recipe[nginx]]
==> default: [2014-05-14T11:16:08+00:00] INFO: Run List expands to [nginx]
==> default: [2014-05-14T11:16:08+00:00] INFO: Starting Chef Run for precise64
==> default: [2014-05-14T11:16:08+00:00] INFO: Running start handlers
==> default: [2014-05-14T11:16:08+00:00] INFO: Start handlers complete.
==> default: 
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb
==> default: ================================================================================
==> default: 
==> default: NameError
==> default: ---------
==> default: uninitialized constant Chef::Resource::LWRPBase
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb:21
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb:
==> default: 
==> default:   1:  #
==> default:   2:  # Cookbook Name:: build-essential
==> default:   3:  # Library:: xcode_command_line_tools
==> default:   4:  #
==> default:   5:  # Copyright 2014, Chef Software, Inc.
==> default:   6:  #
==> default:   7:  # Licensed under the Apache License, Version 2.0 (the "License");
==> default:   8:  # you may not use this file except in compliance with the License.
==> default:   9:  # You may obtain a copy of the License at
==> default: [2014-05-14T11:16:09+00:00] ERROR: Running exception handlers
==> default: [2014-05-14T11:16:09+00:00] ERROR: Exception handlers complete
==> default: [2014-05-14T11:16:09+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-05-14T11:16:09+00:00] FATAL: NameError: uninitialized constant Chef::Resource::LWRPBase
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.`

我正在使用带有流浪汉的berkshelf-vagrant插件

Vagrant 1.6.2

我的流浪文件包含以下内容:

config.vm.provision :chef_solo do |chef|

  chef.run_list = [
    "recipe[nginx]"
  ]
end

1 个答案:

答案 0 :(得分:8)

您使用的是旧版本的Chef。您可能希望使用vagrant-omnibus在您的框中安装更现代的Chef版本。

您的问题与COOK-4441非常相似。原因:厨师10,而11则是必需的。