I'm running Chef solo (version 11.4.0) on a clean VPS with Ubuntu 12 installed, and I'm having some problems with apt
. The problem was that any package
command raised an error:
Chef::Exceptions::Exec
----------------------
apt-get -q -y install update-notifier-common=0.126 returned 100, expected 0
But, running that command on the shell worked perfectly.
After investigating it for a while I found that people recommended to run Opscode apt
cookbook (version 1.9.0) in the run list before any cookbook. That way, some problems with apt-get update
cache were solved.
So I put in my run list the cookbook apt
first, and I'm still having the same errors:
Recipe: apt::default
* execute[apt-get-update] action run
- execute apt-get update
* execute[apt-get update] action nothing (up to date)
* execute[apt-get autoremove] action nothing (up to date)
* execute[apt-get autoclean] action nothing (up to date)
* package[update-notifier-common] action install
================================================================================
Error executing action `install` on resource 'package[update-notifier-common]'
================================================================================
Chef::Exceptions::Exec
----------------------
apt-get -q -y install update-notifier-common=0.126 returned 100, expected 0
Resource Declaration:
---------------------
# In /home/ubuntu/.chef/toldo-cookbooks/cookbooks/apt/recipes/default.rb
48: package "update-notifier-common" do
49: notifies :run, resources(:execute => "apt-get-update"), :immediately
50: end
51:
Compiled Resource:
------------------
# Declared in /home/ubuntu/.chef/toldo-cookbooks/cookbooks/apt/recipes/default.rb:48:in `from_file'
package("update-notifier-common") do
action :install
retries 0
retry_delay 2
package_name "update-notifier-common"
version "0.126"
cookbook_name :apt
recipe_name "default"
end
[2013-02-24T19:31:10+00:00] ERROR: Running exception handlers
[2013-02-24T19:31:10+00:00] ERROR: Exception handlers complete
Chef Client failed. 1 resources updated
[2013-02-24T19:31:10+00:00] FATAL: Stacktrace dumped to /home/ubuntu/.chef/toldo-cookbooks/chef-stacktrace.out
[2013-02-24T19:31:10+00:00] FATAL: Chef::Exceptions::Exec: package[update-notifier-common] (apt::default line 48) had an error: Chef::Exceptions::Exec: apt-get -q -y install update-notifier-common=0.126 returned 100, expected 0
Do you have some clue from where I can continue my investigation?
Many thanks!