Chef infra 使用chef generate cookbook生成烹饪书时出错
我是厨师和学习新手。我在生成烹饪书时遇到以下错误。我遵循了以下步骤。请让我知道进一步的步骤Chef infra 使用chef generate cookbook生成烹饪书时出错,chef-infra,Chef Infra,我是厨师和学习新手。我在生成烹饪书时遇到以下错误。我遵循了以下步骤。请让我知道进一步的步骤 root@ip-IPAddress:/home/ubuntu/chef-repo/cookbooks# chef generate cookbook webserver Command 'chef' is available in '/usr/games/chef' The command could not be located because '/usr/games' is not included
root@ip-IPAddress:/home/ubuntu/chef-repo/cookbooks# chef generate cookbook webserver
Command 'chef' is available in '/usr/games/chef'
The command could not be located because '/usr/games' is not included in the PATH environment variable.
chef: command not found
根据我的建议,我添加了这个
root@ip-172-31-7-14:/home/ubuntu/chef-repo/cookbooks# export PATH="/usr/games:$PATH"
root@ip-172-31-7-14:/home/ubuntu/chef-repo/cookbooks# chef generate cookbook webserver
Can't open generate: No such file or directory.
Can't open cookbook: No such file or directory.
Can't open webserver: No such file or directory.
您的操作系统似乎是
Ubuntu
,我尝试通过以下步骤在我的Ubuntu VPS上安装chef
,效果很好:
root@Mc:~# dpkg -i chef-server*
root@Mc:~# chef
chef chef-apply chef-client chef-shell chef-solo chef-vault
root@Mc:~# chef -v
Chef Development Kit Version: 1.3.43
chef-client version: 12.19.36
delivery version: master (dd319aa632c2f550c92a2172b9d1226478fea997)
berks version: 5.6.4
kitchen version: 1.16.0
$ chef generate app first_cookbook
您可以从中查看更多详细信息。希望这有帮助。您不必安装ruby,chefdk附带嵌入式ruby。
$ chef generate app first_cookbook