Ruby 如何解决Mixlib::ShellOut::ShellCommandFailed错误

Ruby 如何解决Mixlib::ShellOut::ShellCommandFailed错误,ruby,Ruby,我试图模拟节点的数据并运行chefspec。但是面对这个错误。Chefspec版本=7.3.4 厨师长版本=13.9.1 模拟有什么问题吗?如何解决处理程序错误? 这里有我遗漏的东西吗?如何调试Mixlib::ShellOut::CommandTimeout ================================================================================ Error executing action `install` on res

我试图模拟节点的数据并运行chefspec。但是面对这个错误。Chefspec版本=7.3.4 厨师长版本=13.9.1 模拟有什么问题吗?如何解决处理程序错误? 这里有我遗漏的东西吗?如何调试Mixlib::ShellOut::CommandTimeout

================================================================================
Error executing action `install` on resource 'python_package[setuptools]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python2.7", "-", "setuptools==40.5.0"] ----
STDOUT: 
STDERR: No handlers could be found for logger "pip._internal.index"
Traceback (most recent call last):
  File "<stdin>", line 43, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/index.py", line 543, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for setuptools==40.5.0
---- End output of ["/usr/bin/python2.7", "-", "setuptools==40.5.0"] ----
Ran ["/usr/bin/python2.7", "-", "setuptools==40.5.0"] returned 1

Resource Declaration:
---------------------
# In /chef-recipes/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb

138:         python_package 'setuptools' do
139:           parent_python new_resource
140:           version setuptools_version if setuptools_version.is_a?(String)
141:         end
142:       end

Compiled Resource:
------------------
# Declared in /chef-recipes/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:138:in `install_setuptools'

python_package("setuptools") do
  package_name "setuptools"
  action [:install]
  default_guard_interpreter :default
  declared_type :python_package
  cookbook_name :"poise-python"
  parent_python python_runtime[2]
  version "40.5.0"
  timeout 900
end

System Info:
------------
chef_version=13.9.1
platform=ubuntu
platform_version=16.04
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
program_name=/usr/local/rvm/gems/ruby-2.4.2/bin/rspec
executable=/usr/local/rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks
================================================================================
在资源“python_包[setuptools]”上执行操作“安装”时出错
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
预期进程将与[0]一起退出,但收到“1”
----开始输出[“/usr/bin/python2.7”、“-”、“setuptools==40.5.0”]----
标准:
STDERR:找不到记录器“pip.\u internal.index”的处理程序
回溯(最近一次呼叫最后一次):
文件“”,第43行,在
文件“/usr/local/lib/python2.7/dist packages/pip/_internal/index.py”,第543行,在find_需求中
'找不到%s“%req”的匹配分发
pip.\u internal.exceptions.DistributionNotFound:找不到setuptools==40.5.0的匹配分布
----[“/usr/bin/python2.7”、“-”、“setuptools==40.5.0”]的结束输出----
运行[“/usr/bin/python2.7”、“-”、“setuptools==40.5.0”]返回1
资源声明:
---------------------
#在/chef recipes/cookbooks/poise python/files/halite_gem/poise_python/python_providers/base.rb中
138:python_包“setuptools”的作用
139:父级\u python新\u资源
140:版本setuptools\u版本如果setuptools\u版本。是否为?(字符串)
141:完
142:完
汇编资源:
------------------
#在/chef recipes/cookbooks/poise python/files/halite_gem/poise_python/python_providers/base.rb:138:在'install_setuptools'中声明
python_包(“setuptools”)做什么
软件包名称“setuptools”
操作[:安装]
默认\u保护\u解释器:默认值
声明的\u类型:python\u包
食谱名称:“海豚蟒蛇”
父python运行时[2]
版本“40.5.0”
超时900
结束
系统信息:
------------
chef_版本=13.9.1
平台=ubuntu
平台_版本=16.04
ruby=ruby 2.4.2p198(2017-09-14修订版59899)[x86_64-linux]
程序名=/usr/local/rvm/gems/ruby-2.4.2/bin/rspec
可执行文件=/usr/local/rvm/gems/ruby-2.4.2/bin/ruby\u可执行文件