Reputation: 11
I am new to chef and learning.I am getting the below error while generating the cook book.i followed the below steps .Please let me know the further steps to proceed.
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
for that as per the suggestion i added this.
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.
Upvotes: 1
Views: 1763
Reputation: 11477
It seems your operating system is Ubuntu
, I tried to install chef
on my ubuntu VPS by following steps, it works well:
Download the Chef development kit: https://downloads.chef.io/chefdk/.
$ wget https://packages.chef.io/files/stable/chefdk/1.3.43/ubuntu/16.04/chefdk_1.3.43-1_amd64.deb
Install the package, and the PATH will be set automatically,
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
Generate a cookbook:
$ chef generate app first_cookbook
You can see more details from chef docs. Hope this helps.
Upvotes: 2