2014-05-15 202 views
2

当我尝试运行“流浪者提供”我得到这个错误:流浪&厨师:未初始化不断厨师::资源:: LWRPBase

Running chef-solo... 
stdin: is not a tty 
[2014-05-15T12:21:41+00:00] INFO: *** Chef 10.14.2 *** 
[2014-05-15T12:21:41+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[vim]", "recipe[git]", "recipe[mysql::server]", "recipe[apache2]", "recipe[php]", "recipe[vhosts]", "recipe[apache2::mod_php5]", "recipe[php::module_mysql]", "recipe[php::module_apc]", "recipe[php::module_curl]", "recipe[phpmyadmin]", "recipe[phpredis]", "recipe[redis-package::server]", "recipe[nodejs]", "recipe[composer]", "recipe[couchbase::server]", "recipe[symfony2_stuff]"] from JSON 
[2014-05-15T12:21:41+00:00] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[vim], recipe[git], recipe[mysql::server], recipe[apache2], recipe[php], recipe[vhosts], recipe[apache2::mod_php5], recipe[php::module_mysql], recipe[php::module_apc], recipe[php::module_curl], recipe[phpmyadmin], recipe[phpredis], recipe[redis-package::server], recipe[nodejs], recipe[composer], recipe[couchbase::server], recipe[symfony2_stuff]] 
[2014-05-15T12:21:41+00:00] INFO: Run List expands to [apt, build-essential, vim, git, mysql::server, apache2, php, vhosts, apache2::mod_php5, php::module_mysql, php::module_apc, php::module_curl, phpmyadmin, phpredis, redis-package::server, nodejs, composer, couchbase::server, symfony2_stuff] 
[2014-05-15T12:21:41+00:00] INFO: Starting Chef Run for precise64 
[2014-05-15T12:21:41+00:00] INFO: Running start handlers 
[2014-05-15T12:21:41+00:00] INFO: Start handlers complete. 

================================================================================ 
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb 
================================================================================ 

NameError 
--------- 
uninitialized constant Chef::Resource::LWRPBase 

Cookbook Trace: 
--------------- 
    /tmp/vagrant-chef-1/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb:21 

Relevant File Content: 
---------------------- 
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/build-essential/libraries/xcode_command_line_tools.rb: 

    1: # 
    2: # Cookbook Name:: build-essential 
    3: # Library:: xcode_command_line_tools 
    4: # 
    5: # Copyright 2014, Chef Software, Inc. 
    6: # 
    7: # Licensed under the Apache License, Version 2.0 (the "License"); 
    8: # you may not use this file except in compliance with the License. 
    9: # You may obtain a copy of the License at 

[2014-05-15T12:21:42+00:00] ERROR: Running exception handlers 
[2014-05-15T12:21:42+00:00] ERROR: Exception handlers complete 
[2014-05-15T12:21:42+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
[2014-05-15T12:21:42+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. 

安装的Xcode &命令行工具。我已经更新了厨师和流浪汉 - 所以有什么想法?

盒:https://bitbucket.org/creativebrains/box

我搜索术语“LWRPBase”但没有找到任何答案。

+1

你需要更新你的厨师 – sethvargo

+0

更新了我的厨师到最新版本 - 流浪者选择这个厨师的版本,但我不知道为什么(是不是很难在任何文件编码)! – mrks

+0

VM上的厨师(客人)操作系统,而不是您的主机系统是什么需要更新。 – Charlie

回答

2

你正在使用什么版本的build_essential食谱?你似乎在厨师(10.14.2)的一个漂亮的旧版本,我不知道你是否碰到:https://tickets.opscode.com/browse/COOK-4441

+3

OP至少使用build-essentials的2.0.0版本,它包含'libraries/xcode_command_line_tools.rb'。因此,与厨师10的不兼容实际上是问题。 OP可以升级到Chef 11或使用旧版本的“build-essential”食谱。 –

+0

已经评论过,我已经安装了最新版本的Chef。所以Vagrant选择这个版本,但我不知道为什么! – mrks

+1

这可能是你的基盒已经安装了厨师。否则,您可以使用[vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus)插件在您的访客信箱中安装特定版本的厨师。 (或:最新的) – Charlie