0

我在运行时遇到错误

$ kitchen create

有谁知道我做错了什么?

 INFO -- Kitchen: -----> Starting Kitchen (v1.21.2)
 INFO -- Kitchen: -----> Creating <default-centos-75>...
ERROR -- Kitchen: ------Exception-------
ERROR -- Kitchen: Class: Kitchen::ActionFailed
ERROR -- Kitchen: Message: 1 actions failed.
ction: [work_image build failed: The command '/bin/sh -c yum install -y hostname iproute less lsof net-tools openssl which' returned a non-zero code: 1. The common scenerios are incorrect intermediateinstructions such as not including `-y` on an `apt-get` or similar. The other common scenerio is a transient error such as an unresponsive mirror.] on default-centos-75
ERROR -- Kitchen: ----------------------
ERROR -- Kitchen: ------Backtrace-------
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:183:in `report_errors'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:174:in `run_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command/action.rb:36:in `block in call'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command/action.rb:34:in `call'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/cli.rb:52:in `perform'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/cli.rb:193:in `block (2 levels) in <class:CLI>'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/bin/kitchen:13:in `block in <top (required)>'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/errors.rb:171:in `with_friendly_errors'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/bin/kitchen:13:in `<top (required)>'
ERROR -- Kitchen: /usr/local/bin/kitchen:270:in `load'
ERROR -- Kitchen: /usr/local/bin/kitchen:270:in `<main>'
ERROR -- Kitchen: ----End Backtrace-----
ERROR -- Kitchen: -Composite Exception--
ERROR -- Kitchen: Class: Kitchen::ActionFailed
ERROR -- Kitchen: Message: Failed to complete #create action: [work_image build failed: The command '/bin/sh -c yum install -y hostname iproute less lsof net-tools openssl which' returned a non-zero code: 1. The common scenerios are incorrect intermediateinstructions such as not including `-y` on an `apt-get` or similar. The other common scenerio is a transient error such as an unresponsive mirror.] on default-centos-75
ERROR -- Kitchen: ----------------------
ERROR -- Kitchen: ------Backtrace-------
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:156:in `rescue in build_work_image'
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:140:in `build_work_image'
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:83:in `create'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `public_send'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `block in perform_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:536:in `synchronize_or_call'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:498:in `block in action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:497:in `action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `perform_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:379:in `create_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:368:in `block in transition_to'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:367:in `each'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:367:in `transition_to'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:124:in `create'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:197:in `public_send'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:197:in `run_action_in_thread'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
ERROR -- Kitchen: ----End Backtrace-----
ERROR -- Kitchen: ---Nested Exception---
ERROR -- Kitchen: Class: Kitchen::ActionFailed
ERROR -- Kitchen: Message: Failed to complete #create action: [work_image build failed: The command '/bin/sh -c yum install -y hostname iproute less lsof net-tools openssl which' returned a non-zero code: 1. The common scenerios are incorrect intermediateinstructions such as not including `-y` on an `apt-get` or similar. The other common scenerio is a transient error such as an unresponsive mirror.]
ERROR -- Kitchen: ----------------------
ERROR -- Kitchen: ------Backtrace-------
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:156:in `rescue in build_work_image'
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:140:in `build_work_image'
ERROR -- Kitchen: /Users/root1/.chefdk/gem/ruby/2.5.0/gems/kitchen-dokken-2.6.7/lib/kitchen/driver/dokken.rb:83:in `create'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `public_send'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `block in perform_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:536:in `synchronize_or_call'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:498:in `block in action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:497:in `action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:469:in `perform_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:379:in `create_action'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:368:in `block in transition_to'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:367:in `each'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:367:in `transition_to'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/instance.rb:124:in `create'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:197:in `public_send'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:197:in `run_action_in_thread'
ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/test-kitchen-1.21.2/lib/kitchen/command.rb:169:in `block (2 levels) in run_action'
ERROR -- Kitchen: ----End Backtrace-----

我正在使用 Docker for Mac

在此处输入图像描述

在 Mac OS High Sierra 上。

谢谢你。

4

1 回答 1

0

我清理了我的 docker 图像和卷:

docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs  docker rmi
docker volume ls -qf dangling=true | xargs docker volume rm

厨房创建现在工作正常。

于 2018-12-10T22:04:26.990 回答