I have a recipe that is the last on my run list. I get the below error.
The recipe is install first. If I remove the recipe from the run list then
after a first boot the recipe is installed. So…as of now I have to do two
runs which makes no sense. Without out the recipe and after first boot
then with the recipe. What is soooo special about installing gem files?
Why do that have to be installed first? The same issues is with installing
ec2-knife as well.
In the first recipe in the run list I have
package “build-essential” do
action :install
end
Its also in the recipe in question.
It fails with this error.
gem_package “knife-ec2” do
action :nothing
end.run_action(:install)
gem_package “riemann-dash” do
action :nothing
end.run_action(:install)
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com================================================================================
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com Error executing
action install
on resource 'gem_package[riemann-dash]'
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com================================================================================
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.comMixlib::ShellOut::ShellCommandFailed
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com------------------------------------
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com Expected process to
exit with [0], but received ‘1’
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com ---- Begin output of
/opt/chef/embedded/bin/gem install riemann-dash -q --no-rdoc --no-ri -v
"0.2.1" ----
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com STDOUT: Building
native extensions. This could take a while…
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com STDERR: ERROR: Error
installing riemann-dash:
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com ERROR: Failed to
build gem native extension.
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
/opt/chef/embedded/bin/ruby extconf.rb
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com checking for main()
in -lssl… *** extconf.rb failed ***
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com Could not create
Makefile due to some reason, probably lack of
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com necessary libraries
and/or headers. Check the mkmf.log file for more
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com details. You may
need configuration options.
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com Provided
configuration options:
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-opt-dir
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-opt-include
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–without-opt-include={opt-dir}/include
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-opt-lib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
--without-opt-lib={opt-dir}/lib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-make-prog
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–without-make-prog
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --srcdir=.
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --curdir
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–ruby=/opt/chef/embedded/bin/ruby
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–with-openssl-config
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–without-openssl-config
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-pkg-config
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–without-pkg-config
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-ssl-dir
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --without-ssl-dir
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-ssl-include
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
–without-ssl-include={ssl-dir}/include
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-ssl-lib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com
--without-ssl-lib={ssl-dir}/lib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --with-ssllib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com --without-ssllib
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com/opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:381:in
`try_do’: The compiler
failed to generate an executable file. (RuntimeError)
ec2-54-252-8-168.ap-southeast-2.compute.amazonaws.com You have to install
development tools first.