【问题标题】:Chef ignores apt-get update厨师忽略 apt-get 更新
【发布时间】: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

【问题讨论】:

  • 您可能希望将sudogksu 放在命令前面。或者确保您的应用程序以 root 身份运行。
  • 添加 sudogksu 没有任何区别。该应用程序当前以 root 身份运行。
  • 你的virtualbox是否可以访问外部世界?例如。它可以 ping 远程仓库吗?
  • 您的 run_list 中是否包含 apt 配方?如果是这样,它已经定义了一个名为 execute[apt-get update] 的资源,它的动作为 :nothing。
  • 您是否尝试过改用bash 资源?但我也建议使用 apt 食谱。

标签: linux ubuntu chef-infra vagrant apt-get


【解决方案1】:

添加这个食谱对我有用(这是一个“官方”食谱):https://github.com/opscode-cookbooks/apt

【讨论】:

    猜你喜欢
    • 2018-10-30
    • 2020-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多