Skip to content

Instantly share code, notes, and snippets.

@jperry
Created May 16, 2014 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jperry/46dd2e753ac7c817a6ec to your computer and use it in GitHub Desktop.
Save jperry/46dd2e753ac7c817a6ec to your computer and use it in GitHub Desktop.
libarchive gem install
==> ubuntu: ================================================================================
==> ubuntu: Error executing action `install` on resource 'chef_gem[libarchive-ruby]'
==> ubuntu: ================================================================================
==> ubuntu:
==> ubuntu:
==> ubuntu: Gem::Installer::ExtensionBuildError
==> ubuntu: -----------------------------------
==> ubuntu: ERROR: Failed to build gem native extension.
==> ubuntu:
==> ubuntu: /opt/chef/embedded/bin/ruby extconf.rb
==> ubuntu: checking for main() in -larchive... *** extconf.rb failed ***
==> ubuntu: Could not create Makefile due to some reason, probably lack of
==> ubuntu: necessary libraries and/or headers. Check the mkmf.log file for more
==> ubuntu: details. You may need configuration options.
==> ubuntu:
==> ubuntu: Provided configuration options:
==> ubuntu: --with-opt-dir
==> ubuntu: --with-opt-include
==> ubuntu: --without-opt-include=${opt-dir}/include
==> ubuntu: --with-opt-lib
==> ubuntu: --without-opt-lib=${opt-dir}/lib
==> ubuntu: --with-make-prog
==> ubuntu: --without-make-prog
==> ubuntu: --srcdir=.
==> ubuntu: --curdir
==> ubuntu: --ruby=/opt/chef/embedded/bin/ruby
==> ubuntu: --with-archive-dir
==> ubuntu: --without-archive-dir
==> ubuntu: --with-archive-include
==> ubuntu: --without-archive-include=${archive-dir}/include
==> ubuntu: --with-archive-lib
==> ubuntu: --without-archive-lib=${archive-dir}/lib
==> ubuntu: --with-libarchive-config
==> ubuntu: --without-libarchive-config
==> ubuntu: --with-pkg-config
==> ubuntu: --without-pkg-config
==> ubuntu: --with-archivelib
==> ubuntu: --without-archivelib
==> ubuntu: /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
==> ubuntu: You have to install development tools first.
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:870:in `block in find_library'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:866:in `find_library'
==> ubuntu: from extconf.rb:28:in `<main>'
==> ubuntu:
==> ubuntu:
==> ubuntu: Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libarchive-ruby-0.0.3 for inspection.
==> ubuntu: Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libarchive-ruby-0.0.3/ext/gem_make.out
==> ubuntu:
==> ubuntu:
==> ubuntu:
==> ubuntu: Cookbook Trace:
==> ubuntu: ---------------
==> ubuntu: /var/cache/chef/cookbooks/libarchive/recipes/default.rb:27:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/berkshelf-api/recipes/app.rb:20:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/berkshelf-api/recipes/default.rb:20:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/bce_berkshelf-api/recipes/default.rb:24:in `from_file'
==> ubuntu:
==> ubuntu:
==> ubuntu: Resource Declaration:
==> ubuntu: ---------------------
==> ubuntu: # In /var/cache/chef/cookbooks/libarchive/recipes/default.rb
==> ubuntu:
==> ubuntu: 27: chef_gem "libarchive-ruby" do
==> ubuntu: 28: version "0.0.3"
==> ubuntu: 29: end
==> ubuntu:
==> ubuntu:
==> ubuntu:
==> ubuntu: Compiled Resource:
==> ubuntu: ------------------
==> ubuntu: # Declared in /var/cache/chef/cookbooks/libarchive/recipes/default.rb:27:in `from_file'
==> ubuntu:
==> ubuntu: chef_gem("libarchive-ruby") do
==> ubuntu: provider Chef::Provider::Package::Rubygems
==> ubuntu: action :install
==> ubuntu: retries 0
==> ubuntu: retry_delay 2
==> ubuntu: guard_interpreter :default
==> ubuntu: package_name "libarchive-ruby"
==> ubuntu: version "0.0.3"
==> ubuntu: cookbook_name "libarchive"
==> ubuntu: recipe_name "default"
==> ubuntu: end
==> ubuntu:
==> ubuntu:
==> ubuntu:
==> ubuntu:
==> ubuntu: ================================================================================
==> ubuntu: Recipe Compile Error in /var/cache/chef/cookbooks/bce_berkshelf-api/recipes/default.rb
==> ubuntu: ================================================================================
==> ubuntu:
==> ubuntu:
==> ubuntu: Gem::Installer::ExtensionBuildError
==> ubuntu: -----------------------------------
==> ubuntu: chef_gem[libarchive-ruby] (libarchive::default line 27) had an error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
==> ubuntu:
==> ubuntu: /opt/chef/embedded/bin/ruby extconf.rb
==> ubuntu: checking for main() in -larchive... *** extconf.rb failed ***
==> ubuntu: Could not create Makefile due to some reason, probably lack of
==> ubuntu: necessary libraries and/or headers. Check the mkmf.log file for more
==> ubuntu: details. You may need configuration options.
==> ubuntu:
==> ubuntu: Provided configuration options:
==> ubuntu: --with-opt-dir
==> ubuntu: --with-opt-include
==> ubuntu: --without-opt-include=${opt-dir}/include
==> ubuntu: --with-opt-lib
==> ubuntu: --without-opt-lib=${opt-dir}/lib
==> ubuntu: --with-make-prog
==> ubuntu: --without-make-prog
==> ubuntu: --srcdir=.
==> ubuntu: --curdir
==> ubuntu: --ruby=/opt/chef/embedded/bin/ruby
==> ubuntu: --with-archive-dir
==> ubuntu: --without-archive-dir
==> ubuntu: --with-archive-include
==> ubuntu: --without-archive-include=${archive-dir}/include
==> ubuntu: --with-archive-lib
==> ubuntu: --without-archive-lib=${archive-dir}/lib
==> ubuntu: --with-libarchive-config
==> ubuntu: --without-libarchive-config
==> ubuntu: --with-pkg-config
==> ubuntu: --without-pkg-config
==> ubuntu: --with-archivelib
==> ubuntu: --without-archivelib
==> ubuntu: /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
==> ubuntu: You have to install development tools first.
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:870:in `block in find_library'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
==> ubuntu: from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:866:in `find_library'
==> ubuntu: from extconf.rb:28:in `<main>'
==> ubuntu:
==> ubuntu:
==> ubuntu: Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libarchive-ruby-0.0.3 for inspection.
==> ubuntu: Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libarchive-ruby-0.0.3/ext/gem_make.out
==> ubuntu:
==> ubuntu:
==> ubuntu:
==> ubuntu: Cookbook Trace:
==> ubuntu: ---------------
==> ubuntu: /var/cache/chef/cookbooks/libarchive/recipes/default.rb:27:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/berkshelf-api/recipes/app.rb:20:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/berkshelf-api/recipes/default.rb:20:in `from_file'
==> ubuntu: /var/cache/chef/cookbooks/bce_berkshelf-api/recipes/default.rb:24:in `from_file'
==> ubuntu:
==> ubuntu:
==> ubuntu: Relevant File Content:
==> ubuntu: ----------------------
==> ubuntu: /var/cache/chef/cookbooks/libarchive/recipes/default.rb:
==> ubuntu:
==> ubuntu: 20: package "libarchive-devel" do
==> ubuntu: 21: action :nothing
==> ubuntu: 22: end.run_action(:install)
==> ubuntu: 23: else
==> ubuntu: 24: Chef::Application.fatal! "[libarchive] unsupported platform family: #{node[:platform_family]}"
==> ubuntu: 25: end
==> ubuntu: 26:
==> ubuntu: 27>> chef_gem "libarchive-ruby" do
==> ubuntu: 28: version "0.0.3"
==> ubuntu: 29: end
==> ubuntu: 30:
==> ubuntu:
==> ubuntu:
@squaresurf
Copy link

I'm having a similar error while trying to converge the berkshelf api server cookbook. Have you been able to figure out what was causing this?

@squaresurf
Copy link

I figured out that I didn't have enough memory left on the machine I was installing the chef api server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment