厨师生成菜谱

Chef generate cookbook

我在创建食谱时遇到问题,如下所示:

这可能与什么有关?我安装了 chef-dk。我是厨师新手,所以如果您需要更多关于我的环境的信息,请不要犹豫。

root@chef-work:/home/ubuntu/chef-repo/cookbooks# chef generate cookbook learn_chef_apache2
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_PAPER = "nb_NO.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't open generate: No such file or directory.
Can't open cookbook: No such file or directory.
Can't open learn_chef_apache2: No such file or directory.

检查您的 $PATH,type -a chef。我猜您安装了多个 chef 可执行文件,而来自 ChefDK 的不是第一个。您可以将 chef shell-init 移动到 shellrc 文件的底部。