代码之家  ›  专栏  ›  技术社区  ›  Ondra Žižka David Lilljegren

Chef kitchen突然停止使用“找不到‘net scp’”(Ubuntu 17.10)

  •  0
  • Ondra Žižka David Lilljegren  · 技术社区  · 7 年前

    我在做一个项目,突然,对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>'
    

    我该怎么办?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Ondra Žižka David Lilljegren    7 年前

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

    我不知道为什么他们被卸载了,为什么chef没有用它的软件包安装他们。

    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: