chef [SOLVED]: Cookbook apt not found

chef [SOLVED]: Cookbook apt not found

Home Forums Automation Tools Chef Tutorials chef [SOLVED]: Cookbook apt not found

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #205394

    Cloudy Point
    Keymaster

    QuestionQuestion

    I have been trying to run my cookbooks from many hours and gone through multiple questions regarding the same but still couldn’t manage to make it work.

    sudo chef-solo -c solo.rb -j node.json -o main::default;

    I’m running the above command inside my cookbooks folder which contains other cookbooks like apt, git, etc.

    And, inside cookbooks/main/recipe/default.rb I’m including include_recipe "apt".

    Every time, I run the command I get the following error:

    Cookbook apt not found. If you’re loading apt from another cookbook,
    make sure you configure the dependency in your metadata

    So I added depends "apt" inside my cookbooks/main/metadata.rb. But now I’m getting this error:

    Cookbook depends on itself in cookbook apt, please remove this
    unnecessary self-dependency

    #205395

    Cloudy Point
    Keymaster

    Accepted AnswerAnswer

    A second answer because this was diagnosed on Slack, themain cookbook had name "apt" in its metadata which made the error message confusing.

    Source: https://stackoverflow.com/questions/46646442/cookbook-apt-not-found
    Author: coderanger
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.