ネイティブパッケージがインストールされている前に、宝石のインストールがシェフの実行中にネイティブ拡張パッケージの後に宝石をインストール
package "libxslt-dev"
package "libxml2-dev"
chef_gem "fog"
これを失敗したように、宝石のインストールが発生しても、私はシェフのレシピに霧の宝石をインストールしようとしています出力は
[Thu, 14 Mar 2013 13:04:30 +0000] INFO: Processing chef_gem[fog] action install (ebs4000::update_volumes line 23)
[Thu, 14 Mar 2013 13:04:52 +0000] ERROR: Running exception handlers
[Thu, 14 Mar 2013 13:04:52 +0000] FATAL: Saving node information to /var/cache/chef/failed-run-data.json
[Thu, 14 Mar 2013 13:04:52 +0000] ERROR: Exception handlers complete
[Thu, 14 Mar 2013 13:04:52 +0000] ERROR: Gem::Installer::ExtensionBuildError: chef_gem[fog] (cookbook::recipe line 4) had an error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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
--without-opt-dir
...
--with-pkg-config
--without-pkg-config
Gem files will remain installed in /var/lib/gems/1.8/gems/nokogiri-1.5.6 for inspection.
Results logged to /var/lib/gems/1.8/gems/nokogiri-1.5.6/ext/nokogiri/gem_make.out
私はシェフのリソースのnotifies属性を認識していますが、これも正しく実行されます。
実際に実行順序を強制して、ネイティブパッケージをインストールしてからgemを同じ実行にすることはできますか。
注:パッケージの手動インストールは、新しいノードに対して完全に自動化されるようにするため、オプションではありません。
ありがとう、それはトリックでした! – vervas
パッケージのリストをインストールすることもできます: '%w {libxslt-dev libxml2-dev} .each do | pkg | p =パッケージpkg do アクション:なし end p.run_action(:install) end' – Brett