2

I get this error when i try to run "vagrant provision":

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.

Installed Xcode & the Command Line Tools. I already updated Chef and Vagrant - so any ideas?

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

I search for the term "LWRPBase" but didnt find any answers for it.

mrks
  • 5,439
  • 11
  • 52
  • 74

2 Answers2

3

This stackoverflow thread helped me to run my Vagrantfile with the latest Chef version (which was the problem):

How to control the version of Chef that Vagrant uses to provision VMs?

Community
  • 1
  • 1
mrks
  • 5,439
  • 11
  • 52
  • 74
2

What version of build_essential cookbook are you using? You seem to be on a pretty old version of Chef (10.14.2) and I wonder if you're running into: https://tickets.opscode.com/browse/COOK-4441

Charlie
  • 7,181
  • 1
  • 35
  • 49
  • 3
    OP is using at least version 2.0.0 of build-essentials as only then, it includes `libraries/xcode_command_line_tools.rb`. Thus, the incompatibility with Chef 10 is actually the issue. OP could either upgrade to Chef 11 or use an older version of the `build-essential` cookbook. – Holger Just May 16 '14 at 16:50
  • Already commented, that I have the newest version of Chef installed. So Vagrant is choosing this version but I don't know why! – mrks May 22 '14 at 14:32
  • 1
    It's likely your base box may have Chef installed on it already. Otherwise you would use the [vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus) plugin to install a specific version of chef on your guest box. ( or :latest ) – Charlie May 22 '14 at 14:40
  • 1
    If you're talking about how to control the selected version of build-essentials we would need to know how you're getting the cookbooks to your Guest OS. You're possibly using [vagrant-berkshelf](https://github.com/berkshelf/vagrant-berkshelf) in which case it would be as easy as defining a constraint in your Berksfile or metadata file.. – Charlie May 22 '14 at 14:49