Problems with Chef Provisioning in Vagrant. Cookbook apt not found


#1

Hello.
I am having troubles provision discourse with Vagrant. Got the following error:

**

Chef::Exceptions::CookbookNotFound: Cookbook apt not found. If you're loading apt from another cookbook, make sure you configure the dependency in your metadata
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

**

**Here is the stacktrace of Vagrant:**

Bringing machine ‘default’ up with ‘virtualbox’ provider…
default: The Berkshelf shelf is at “/home/bruno/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150103-11950-1rwtfuu-default”
==> default: Sharing cookbooks with VM
==> default: Importing base box ‘discourse-0.9.9.13’…
==> default: Matching MAC address for NAT networking…
==> default: Setting the name of the VM: discourse_default_1420279062215_62789
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports…
default: 3000 => 4000 (adapter 1)
default: 1080 => 4080 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Running ‘pre-boot’ VM customizations…
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying…
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest…
default: Removing insecure key from the guest if its present…
default: Key inserted! Disconnecting and reconnecting using new SSH key…
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Checking for host entries
==> default: Configuring and enabling network interfaces…
==> default: Exporting NFS shared folders…
==> default: Preparing to edit /etc/exports. Administrator privileges will be required…
nfsd running
==> default: Mounting NFS shared folders…
==> default: Mounting shared folders…
default: /tmp/vagrant-chef-4/chef-solo-1/cookbooks => /home/bruno/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150103-11950-1rwtfuu-default
==> default: Running provisioner: shell…
default: Running: inline script
==> default: stdin: is not a tty
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: (Reading database …
==> default: 66594 files and directories currently installed.)
==> default: Preparing to replace ruby1.9.1-dev 1.9.3.0-1ubuntu2.8 (using …/ruby1.9.1-dev_1.9.3.0-1ubuntu2.10_i386.deb) …
==> default: Unpacking replacement ruby1.9.1-dev …
==> default: Preparing to replace libruby1.9.1-dbg 1.9.3.0-1ubuntu2.8 (using …/libruby1.9.1-dbg_1.9.3.0-1ubuntu2.10_i386.deb) …
==> default: Unpacking replacement libruby1.9.1-dbg …
==> default: Preparing to replace ruby1.9.1 1.9.3.0-1ubuntu2.8 (using …/ruby1.9.1_1.9.3.0-1ubuntu2.10_i386.deb) …
==> default: Unpacking replacement ruby1.9.1 …
==> default: Preparing to replace libruby1.9.1 1.9.3.0-1ubuntu2.8 (using …/libruby1.9.1_1.9.3.0-1ubuntu2.10_i386.deb) …
==> default: Unpacking replacement libruby1.9.1 …
==> default: Preparing to replace libtcltk-ruby1.9.1 1.9.3.0-1ubuntu2.8 (using …/libtcltk-ruby1.9.1_1.9.3.0-1ubuntu2.10_i386.deb) …
==> default: Unpacking replacement libtcltk-ruby1.9.1 …
==> default: Preparing to replace ri1.9.1 1.9.3.0-1ubuntu2.8 (using …/ri1.9.1_1.9.3.0-1ubuntu2.10_all.deb) …
==> default: Unpacking replacement ri1.9.1 …
==> default: Preparing to replace ruby1.9.1-examples 1.9.3.0-1ubuntu2.8 (using …/ruby1.9.1-examples_1.9.3.0-1ubuntu2.10_all.deb) …
==> default: Unpacking replacement ruby1.9.1-examples …
==> default: Preparing to replace ruby1.9.1-full 1.9.3.0-1ubuntu2.8 (using …/ruby1.9.1-full_1.9.3.0-1ubuntu2.10_all.deb) …
==> default: Unpacking replacement ruby1.9.1-full …
==> default: Preparing to replace ruby1.9.3 1.9.3.0-1ubuntu2.8 (using …/ruby1.9.3_1.9.3.0-1ubuntu2.10_all.deb) …
==> default: Unpacking replacement ruby1.9.3 …
==> default: Processing triggers for man-db …
==> default: Setting up libruby1.9.1 (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ruby1.9.1-dev (1.9.3.0-1ubuntu2.10) …
==> default: Setting up libruby1.9.1-dbg (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ruby1.9.1 (1.9.3.0-1ubuntu2.10) …
==> default: Setting up libtcltk-ruby1.9.1 (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ri1.9.1 (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ruby1.9.1-examples (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ruby1.9.1-full (1.9.3.0-1ubuntu2.10) …
==> default: Setting up ruby1.9.3 (1.9.3.0-1ubuntu2.10) …
==> default: Processing triggers for libc-bin …
==> default: ldconfig deferred processing now taking place
==> default: Running provisioner: chef_solo…
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading…
==> default: Running chef-solo…
==> default: stdin: is not a tty
==> default: [2015-01-03T04:58:47-05:00] INFO: *** Chef 10.18.2 ***
==> default: [2015-01-03T04:58:47-05:00] INFO: Setting the run_list to [“recipe[apt]”, “recipe[build-essential]”, “recipe[vim]”, “recipe[java]”, “recipe[imagemagick]”, “recipe[discourse]”] from JSON
==> default: [2015-01-03T04:58:47-05:00] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[vim], recipe[java], recipe[imagemagick], recipe[discourse]]
==> default: [2015-01-03T04:58:47-05:00] INFO: Run List expands to [apt, build-essential, vim, java, imagemagick, discourse]
==> default: [2015-01-03T04:58:47-05:00] INFO: Starting Chef Run for precise32
==> default: [2015-01-03T04:58:47-05:00] INFO: Running start handlers
==> default: [2015-01-03T04:58:47-05:00] INFO: Start handlers complete.
==> default: [2015-01-03T04:58:47-05:00] ERROR: Running exception handlers
==> default: [2015-01-03T04:58:47-05:00] ERROR: Exception handlers complete
==> default: [2015-01-03T04:58:47-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-03T04:58:47-05:00] FATAL: Chef::Exceptions::CookbookNotFound: Cookbook apt not found. If you’re loading apt from another cookbook, make sure you configure the dependency in your metadata
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I dont know where is the problem but where it says “default: The Berkshelf shelf is at “/home/bruno/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150103-11950-1rwtfuu-default””

I have checked that folder and its empty.

Thank you for your help.