Closed hayesmp closed 11 years ago
This is not a cookbook issue. apt
fails to downgrade the package. There can be numerous issues causing this. Try installing it manually to see more info.
Googling around a bit suggests that the most common issue is apt index being out of date. There is an apt
cookbook (e.g. in travis-cookbooks) that runs apt-get update and should be one of the first on run list.
Alternatively, the package resource has an attribute, options
, that is passed to apt
as is. So if you really want
to use --force-yes
, you can add it in your copy of the cookbook. This is a pretty fragile workaround, though.
Are there any guides to getting this setup beyond the recipe? I am completely lost. I'm trying to get a basic local instance up and running to use with Usergrid.
This appears to be the error:
STDERR: E: There are problems and -y was used without --force-yes
[2013-10-22T21:26:52+00:00] DEBUG: package[cassandra] current version is 2.0.1 [2013-10-22T21:26:52+00:00] DEBUG: package[cassandra] candidate version is 2.0.1 [2013-10-22T21:26:52+00:00] DEBUG: Executing apt-get -q -y install cassandra=1.2.9 [2013-10-22T21:26:53+00:00] DEBUG: ---- Begin output of apt-get -q -y install cassandra=1.2.9 ---- [2013-10-22T21:26:53+00:00] DEBUG: STDOUT: Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: jsvc libcommons-daemon-java Suggested packages: java-virtual-machine The following NEW packages will be installed: jsvc libcommons-daemon-java The following packages will be DOWNGRADED: cassandra 0 upgraded, 2 newly installed, 1 downgraded, 0 to remove and 83 not upgraded. Need to get 13.8 MB of archives. After this operation, 87.0 kB disk space will be freed. [2013-10-22T21:26:53+00:00] DEBUG: STDERR: E: There are problems and -y was used without --force-yes [2013-10-22T21:26:53+00:00] DEBUG: ---- End output of apt-get -q -y install cassandra=1.2.9 ---- [2013-10-22T21:26:53+00:00] DEBUG: Ran apt-get -q -y install cassandra=1.2.9 returned 100
================================================================================ Error executing action
install
on resource 'package[cassandra]'Chef::Exceptions::Exec
apt-get -q -y install cassandra=1.2.9 returned 100, expected 0 ---- Begin output of apt-get -q -y install cassandra=1.2.9 ---- STDOUT: Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: jsvc libcommons-daemon-java Suggested packages: java-virtual-machine The following NEW packages will be installed: jsvc libcommons-daemon-java The following packages will be DOWNGRADED: cassandra 0 upgraded, 2 newly installed, 1 downgraded, 0 to remove and 83 not upgraded. Need to get 13.8 MB of archives. After this operation, 87.0 kB disk space will be freed.STDERR: E: There are problems and -y was used without --force-yes ---- End output of apt-get -q -y install cassandra=1.2.9 ----
Resource Declaration:
In /root/chef-solo/cookbooks-1/cassandra/recipes/datastax.rb
Compiled Resource:
Declared in /root/chef-solo/cookbooks-1/cassandra/recipes/datastax.rb:69:in `from_file'
package("cassandra") do action [:install] retries 0 retry_delay 2 package_name "cassandra" version "1.2.9" cookbook_name :cassandra recipe_name "datastax" end
[2013-10-22T21:26:53+00:00] INFO: Running queued delayed notifications before re-raising exception [2013-10-22T21:26:53+00:00] DEBUG: Re-raising exception: Chef::Exceptions::Exec - package[cassandra](cassandra::datastax line 69) had an error: Chef::Exceptions::Exec: apt-get -q -y install cassandra=1.2.9 returned 100, expected 0