无法运行 evil-winrm (ffi 存在一些问题)

无法运行 evil-winrm (ffi 存在一些问题)

运行 evil-winrm 时出现此错误:

    Traceback (most recent call last):
    16: from /usr/local/bin/evil-winrm:23:in `<main>'
    15: from /usr/lib/ruby/2.5.0/rubygems.rb:304:in `activate_bin_path'
    14: from /usr/lib/ruby/2.5.0/rubygems.rb:304:in `synchronize'
    13: from /usr/lib/ruby/2.5.0/rubygems.rb:305:in `block in activate_bin_path'
    12: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1440:in `activate'
    11: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `activate_dependencies'
    10: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `each'
     9: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1472:in `block in activate_dependencies'
     8: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1440:in `activate'
     7: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `activate_dependencies'
     6: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `each'
     5: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1472:in `block in activate_dependencies'
     4: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1440:in `activate'
     3: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `activate_dependencies'
     2: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1458:in `each'
     1: from /usr/lib/ruby/2.5.0/rubygems/specification.rb:1469:in `block in activate_dependencies'
/usr/lib/ruby/2.5.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'ffi' (>= 1.0.1) among 123 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/jayhawk/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/ruby/gems/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0', execute `gem env` for more information

答案1

您的本地 Gemfile 包含以下内容:

source 'https://rubygems.org'

gem 'winrm'
gem 'winrm-fs'
gem 'stringio'

您可以将其安装bundle install在与上述文件相同的目录中。您需要bundler(在基于 Debian 的发行版中,这是ruby-bundler软件包)

ffi单独安装,您可以执行以下操作: gem install ffi

相关内容