【发布时间】:2012-09-09 09:15:08
【问题描述】:
我在 vagrant 中使用 chef 来配置一个精确的 32 虚拟机。
命令:
execute "apt-get update" do
command "apt-get update"
end
好像没有效果。
流浪者 1.0.3 虚拟机 4.1.18
【问题讨论】:
-
您可能希望将
sudo或gksu放在命令前面。或者确保您的应用程序以 root 身份运行。 -
添加
sudo或gksu没有任何区别。该应用程序当前以 root 身份运行。 -
你的virtualbox是否可以访问外部世界?例如。它可以 ping 远程仓库吗?
-
您的 run_list 中是否包含 apt 配方?如果是这样,它已经定义了一个名为 execute[apt-get update] 的资源,它的动作为 :nothing。
-
您是否尝试过改用
bash资源?但我也建议使用 apt 食谱。
标签: linux ubuntu chef-infra vagrant apt-get