【问题标题】:Chef kitchen stopped working all of the sudden with "Could not find 'net-scp'" (Ubuntu 17.10)厨师厨房突然停止工作“找不到'net-scp'”(Ubuntu 17.10)
【发布时间】:2018-02-06 23:06:28
【问题描述】:

我正在处理一个项目,突然间,对任何 Ruby 的任何调用似乎都停止了工作。他们都报告缺少依赖项。

在那之前我正在卸载不相关的 C/C++ -dev 库,这可能是原因,因为我没有做任何我怀疑的事情。

我尝试重新安装 chefdk.deb(已下载),我做了 sudo gem update --system 更改(看起来改进了)堆栈跟踪,但错误仍然相同:

05:56 ~/work/doc/cook 1$ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'net-scp' (~> 1.1) among 266 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/ondra/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
    from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1468:in `block in activate_dependencies'
    from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `each'
    from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `activate_dependencies'
    from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1439:in `activate'
    from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:310:in `block in activate_bin_path'
    from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `synchronize'
    from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `activate_bin_path'
    from /usr/local/bin/kitchen:23:in `<main>'

我该怎么办?

【问题讨论】:

  • 你能分享你的gem列表吗,你可以看看它为什么在寻找低版本的gem
  • 如何列出它们? WRT 版本,隐藏在厨房源脚本深处的某个地方。

标签: ruby dependencies chef-infra test-kitchen


【解决方案1】:

好吧,睡得好之后,我意识到它告诉我它只是找不到某个图书馆。所以我开始安装它们,从sudo gem install net-scp开始。

我不确定为什么它们会被卸载以及为什么厨师没有使用它的软件包安装它们。

05:56 ~/work/doc/cook 1$ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'net-scp' (~> 1.1) among 266 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/ondra/.gem/ruby/2.3.0:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all', execute `gem env` for more information
        from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1468:in `block in activate_dependencies'
        from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `each'
        from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1457:in `activate_dependencies'
        from /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb:1439:in `activate'
        from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:310:in `block in activate_bin_path'
        from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `synchronize'
        from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:309:in `activate_bin_path'
        from /usr/local/bin/kitchen:23:in `<main>'
05:56 ~/work/doc/cook 1$ sudo gem install net-scp
[sudo] password for ondra: 
Fetching: net-scp-1.2.1.gem (100%)
Successfully installed net-scp-1.2.1
Parsing documentation for net-scp-1.2.1
Installing ri documentation for net-scp-1.2.1
Done installing documentation for net-scp after 0 seconds
1 gem installed

14:43 ~/work/doc/cook $ kitchen
/usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'ffi' (>= 1.0.1) among 267 total gem(s) (Gem::MissingSpecError)
Checked in...

14:43 ~/work/doc/cook $ sudo gem install ffi berkshelf
... 
15:09 ~/work/doc/cook 127$ kitchen 
Commands:

【讨论】:

  • 次要注意,您没有使用我们的软件包。我们确实将它包含在 ChefDK 包中,我们也建议您使用它。
  • @coderanger 也许我不是,我只为 Chef 使用 gem,在使事情正常进行的同时,我可以使用一些非标准的包。 Ubuntu 17.10 目前推荐的方式是什么?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-17
  • 1970-01-01
相关资源
最近更新 更多