我也试着运行另一个cookbook工作站,但也出现了同样的错误
请帮忙。让我知道我做错了什么。
[vagrant@localhost ~]$ tree
.
âââ cookbooks
â  âââ apache
â  â  âââ Berksfile
â  â  âââ chefignore
â  â  âââ metadata.rb
â  â  âââ README.md
â  â  âââ recipes
â  â  â  âââ default.rb
â  â  â  âââ server.rb
â  â  âââ spec
â  â  â  âââ spec_helper.rb
â  â  â  âââ unit
â  â  â  âââ recipes
â  â  â  âââ default_spec.rb
â  â  âââ test
â  â  âââ recipes
â  â  âââ default_test.rb
â  âââ workstation
â  âââ Berksfile
â  âââ chefignore
â  âââ metadata.rb
â  âââ README.md
â  âââ recipes
â  â  âââ default.rb
â  â  âââ setup.rb
â  âââ spec
â  â  âââ spec_helper.rb
â  â  âââ unit
â  â  âââ recipes
â  â  âââ default_spec.rb
â  âââ test
â  âââ recipes
â  âââ default_test.rb
âââ generate
âââ hello.rb
âââ help
â  âââ Berksfile
â  âââ chefignore
â  âââ metadata.rb
â  âââ README.md
â  âââ recipes
â  â  âââ default.rb
â  âââ spec
â  â  âââ spec_helper.rb
â  â  âââ unit
â  â  âââ recipes
â  â  âââ default_spec.rb
â  âââ test
â  âââ recipes
â  âââ default_test.rb
âââ nodes
âââ localhost.json
24 directories, 28 files
[vagrant@localhost ~]$ sudo chef-client -z --runlist âapache::serverâ
[2017-08-08T13:16:05+00:00] WARN: No config file found or specified on command line, using command line options.
Starting Chef Client, version 12.14.89
resolving cookbooks for run list: ["âapache::serverâ"]
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: âapache
Expanded Run List:
------------------
* âapache::serverâ
Platform:
---------
x86_64-linux
Running handlers:
[2017-08-08T13:16:07+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-08-08T13:16:07+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2017-08-08T13:16:07+00:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2017-08-08T13:16:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-08T13:16:07+00:00] ERROR: 412 "Precondition Failed"
[2017-08-08T13:16:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[vagrant@localhost ~]$