ubuntuamazon-web-serviceschef-infrachef-recipecookbook

Error executing action `install` on resource 'package[libmysqlclient-dev]'


I am bootstrapping a ec2 ubuntu 13.04 instance using chef. I am using this cookbook. But I am getting following error and the bootstrapping stops doesn't continue.

apt-get -q -y install libmysqlclient-dev=5.5.32-0ubuntu0.13.04.1 returned 100, expected 0
   Resource Declaration:
   In /var/chef/cache/cookbooks/mysql/recipes/client.rb
   package mysql_pack do
   action :install
   48:   end
   49: end
  /var/chef/cache/cookbooks/mysql/recipes/client.rb:46:in `block in from_file'
   package("libmysqlclient-dev") do
    action [:install]
      retries 0
    retry_delay 2
   package_name "libmysqlclient-dev"
   version "5.5.32-0ubuntu0.13.04.1
   cookbook_name "mysql"
   recipe_name "client"
end

I am not able to install mysql or create database also. How do I get rid of this issue.


Solution

  • According to this blog post the error occurs because the yum cache hasn't been updated. If you add the apt::default recipe to the start of the run list it will perform the apt-get update command for you, which should allow the package to be installed.