【问题标题】:Chef mysql opscode-cookbooks desn't work: "could not find recipe ruby for cookbook mysql"Chef mysql opscode-cookbooks 不起作用:“找不到食谱 mysql 的食谱 ruby​​”
【发布时间】:2015-08-05 23:35:30
【问题描述】:

我正在尝试使用https://github.com/opscode-cookbooks/mysql 但是当我运行 vagrant provision 时

找不到食谱 mysql 的食谱 ruby​​,它像这样返回。

[2014-04-23T10:13:06+00:00] ERROR: Running exception handlers
[2014-04-23T10:13:06+00:00] ERROR: Exception handlers complete
[2014-04-23T10:13:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-23T10:13:06+00:00] ERROR: could not find recipe ruby for cookbook mysql

================================================================================
Recipe Compile Error
================================================================================


Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe ruby for cookbook mysql

我找到了这个然后添加了 mysql-chef_gem。 https://github.com/opscode-cookbooks/mysql/blob/b5072e6ae3bd81b0f6ebec8749f2c2d781271ed9/COMPAT.md

knife cookbook site vendor mysql-chef_gem -o cookbook

但是当我在run_list 中添加recipe[crossplat::default] 并运行vagrant provision 时,它会返回

[2014-04-23T10:15:14+00:00] ERROR: Cookbook crossplat not found. If you're loading crossplat from another cookbook, make sure you configure the dependency in your metadata

我该如何解决?

【问题讨论】:

    标签: mysql chef-infra


    【解决方案1】:

    对 mysql 食谱进行了大规模重构,不再需要该食谱。您可以在cookbook's README 中查看更新的用法。

    【讨论】:

    • 刀具食谱网站供应商数据库 -o 食谱我运行这个并解决了!不需要mysql-chef_gem,谢谢sethvargo!
    【解决方案2】:

    cookbooks/mysql/recipes/default.rb 不适用于 mysql 食谱,您需要更新运行列表 "recipe[mysql::server]" 或 "recipe[mysql::client]"

    【讨论】:

    • 你能补充更多细节吗?我必须用什么替换“recipe[mysql::server]”?
    【解决方案3】:

    我在另一本食谱中遇到了类似的错误:

    FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe my_recipe for cookbook my_cookbook
    

    当我在某些时候从食谱下删除 my_recipe.rb 并且客户端仍在某处引用它时,就会出现这种情况。 简单的解决方案是重新添加一个空白食谱文件并重新上传食谱。此博客更详细地描述了该问题,并且可能有更好的解决方案:https://www.rallydev.com/community/engineering/chef-dependency-solving

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 2014-11-06
      • 2015-12-19
      • 2018-01-23
      • 2013-03-08
      相关资源
      最近更新 更多