【问题标题】:Installing a gem w/chef fails with Gem::Installer::ExtensionBuildError: chef_gem[fog]安装带有厨师的 gem 失败,并出现 Gem::Installer::ExtensionBuildError: chef_gem[fog]
【发布时间】:2015-10-05 02:00:14
【问题描述】:

我正在尝试使用 route53 食谱,但它在雾安装阶段不断失败。

libxml2-dev 和 libxslt1-dev 已安装,但 chef_gem "fog" 阶段失败:

Gem::Installer::ExtensionBuildError: chef_gem[fog] (route53::default line 42) had an error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /opt/chef/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp//ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp//ports/libxml2/2.8.0/configure.log' to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/opt/chef/embedded/bin/ruby
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:265:in `block in execute': Failed to complete configure task (RuntimeError)
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `chdir'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `execute'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:65:in `configure'
    from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:108:in `cook'
    from extconf.rb:101:in `block in <main>'
    from extconf.rb:119:in `call'
    from extconf.rb:119:in `block in <main>'
    from extconf.rb:109:in `tap'
    from extconf.rb:109:in `<main>'


Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.out

Installing a gem after native extension packages during chef execution 非常相似,但情况不同。安装秘籍:https://github.com/hw-cookbooks/route53/blob/master/recipes/default.rb

有人对我如何解决这个问题有任何建议吗?基本上故障是 nokogiri 不会安装 ruby​​ 1.9.3p484。 /opt/chef/embedded/bin/gem install nokogiri 也失败了。

【问题讨论】:

标签: ruby gem chef-infra chef-recipe cookbook


【解决方案1】:

您需要在计算机上安装必备软件包。例如,在 Ubuntu 上,您需要安装 build-essential 包,可能还需要安装其他一些包才能成功。

【讨论】:

  • 它是build-essential,没有最后的“s”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-24
  • 1970-01-01
  • 2011-02-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多