Installing a gem after native extension packages during chef execution

天大地大妈咪最大 提交于 2019-12-04 07:25:50

Why not try installing the dependencies at the start of the resource collection phase, as mentioned here: OPSCODE wiki: Run Resources from the Resource Collection

So your recipe would look like:

xsltdev = package "libxslt-dev" do
   action :nothing
end

xmldev = package "libxml2-dev" do
   action :nothing
end

xsltdev.run_action(:install)
xmldev.run_action(:install)

chef_gem "fog"

It seems like you're already doing that. Recipes are executed in order, so you should be good.

In your logs, you're only showing what happened from the point where Chef tries to install fog. Have you verified that the lib packages' install are not coming up before that? You might have gotten the package names wrong, or you need to update the package manager's cache before.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!