gpt4 book ai didi

chef-infra - Chef 验证错误无效 !': Expected process to exit with [0], but received ' 1'

转载 作者:行者123 更新时间:2023-12-01 13:46:29 24 4
gpt4 key购买 nike

运行 chef verify 时出现错误

Running verification for component 'berkshelf'
Running verification for component 'test-kitchen'
Running verification for component 'tk-policyfile-provisioner'
Running verification for component 'chef-client'
Running verification for component 'chef-dk'
Running verification for component 'chef-provisioning'
Running verification for component 'chefspec'
Running verification for component 'generated-cookbooks-pass-chefspec'
Running verification for component 'rubocop'
Running verification for component 'fauxhai'
Running verification for component 'knife-spork'
Running verification for component 'kitchen-vagrant'
Running verification for component 'package installation'
Running verification for component 'openssl'
Running verification for component 'inspec'
................./opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout.rb:289:in `invalid!': Expected process to exit with [0], but received '1' (Mixlib::ShellOut::ShellCommandFailed)
---- Begin output of /usr/local/bin/ohai -v ----
STDOUT:
STDERR: /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'chef-config' (= 12.8.0) - did find: [chef-config-12.7.2] (Gem::LoadError)
Checked in 'GEM_PATH=/Users/saddam/.chefdk/gem/ruby/2.1.0:/opt/chefdk/embedded/lib/ruby/gems/2.1.0', execute `gem env` for more information
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:328:in `to_spec'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/ohai:4:in `<main>'
---- End output of /usr/local/bin/ohai -v ----
Ran /usr/local/bin/ohai -v returned 1
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout.rb:276:in `error!'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/component_test.rb:99:in `block in sh!'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/component_test.rb:99:in `tap'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/component_test.rb:99:in `sh!'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/command/verify.rb:358:in `block (2 levels) in <class:Verify>'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/component_test.rb:78:in `instance_eval'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/component_test.rb:78:in `run_smoke_test'
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-dk-0.11.2/lib/chef-dk/command/verify.rb:475:in `block (2 levels) in invoke_tests'

我想补充一点我在最新版本的 2.2.3 中安装了 ruby​​

最佳答案

似乎当前的 Omnibus 安装程序捆绑了(或期望)错误版本的 chef-config。

更复杂的是 ruby​​gems.org 上还没有 chef-config-12.8.0

我是这样解决的

git clone https://github.com/chef/chef.git
cd chef/chef-config
/opt/chefdk/embedded/bin/gem build chef-config.gemspec
/opt/chefdk/embedded/bin/gem install chef-config-12.8.0.gem

关于chef-infra - Chef 验证错误无效 !': Expected process to exit with [0], but received ' 1',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35645592/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com