在 Manjaro Deepin 中安装 Vagrant 插件时出错

Error While Installing Vagrant Plugins in Manjaro Deepin

我正在使用 vagrant 版本 1.9.4

当尝试安装任何 vagrant 插件时,会出现两个输出之一

我运行这个命令:

vagrant plugin install vagrant-hostmanager

那么这一次出来:

Installing the 'vagrant-managed-servers' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source.rb:192:in `load': Marshal.load reentered at marshal_load (RuntimeError)
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source.rb:192:in `load_specs'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:335:in `block in validate_configured_sources!'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each_source'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:333:in `validate_configured_sources!'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:268:in `internal_install'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:106:in `install'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/manager.rb:62:in `block in install_plugin'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/manager.rb:72:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/manager.rb:72:in `install_plugin'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/action/install_gem.rb:29:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/base.rb:14:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/install.rb:32:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/install.rb:31:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/install.rb:31:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/root.rb:66:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `<main>'

另一次出现的结果是:

/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source.rb:192: [BUG]

Segmentation fault at 0x00000000000010
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0026 p:---- s:0148 e:000147 CFUNC  :load
c:0025 p:0163 s:0144 e:000142 METHOD /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source.rb:192
c:0024 p:0012 s:0131 e:000130 BLOCK  /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:335 [FINISH]
c:0023 p:---- s:0127 e:000126 CFUNC  :each
c:0022 p:0011 s:0124 e:000123 METHOD /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source_list.rb:97
c:0021 p:0015 s:0120 E:001b60 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:333
c:0020 p:0168 s:0117 e:000116 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:268
c:0019 p:0016 s:0102 e:000101 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/bundler.rb:106
c:0018 p:0021 s:0097 e:000096 LAMBDA /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/manager.rb:62 [FINISH]
c:0017 p:---- s:0095 e:000094 CFUNC  :call
c:0016 p:0160 s:0092 E:001c70 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/plugin/manager.rb:72
c:0015 p:0134 s:0081 e:000080 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/action/install_gem.rb:29
c:0014 p:0081 s:0069 e:000068 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/warden.rb:34
c:0013 p:0013 s:0063 e:000062 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/builder.rb:116
c:0012 p:0010 s:0059 e:000058 BLOCK  /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:66
c:0011 p:0014 s:0057 e:000056 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/util/busy.rb:19
c:0010 p:0292 s:0053 E:000598 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/action/runner.rb:66
c:0009 p:0018 s:0043 e:000042 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/base.rb:14
c:0008 p:0042 s:0038 e:000037 BLOCK  /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/install.rb:32 [FINISH]
c:0007 p:---- s:0035 e:000034 CFUNC  :each
c:0006 p:0086 s:0032 E:0021d8 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/install.rb:31
c:0005 p:0111 s:0026 e:000025 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/plugins/commands/plugin/command/root.rb:66
c:0004 p:0158 s:0022 e:000021 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:42
c:0003 p:0020 s:0016 e:000015 METHOD /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308
c:0002 p:0680 s:0012 E:0005a0 EVAL   /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127 [FINISH]
c:0001 p:0000 s:0002 E:000ad0 TOP    [FINISH]

我使用正常的方式安装了 vagrant "yaourt command" 并尝试完全删除并重新安装 来自 "pacman" 但是,仍然有同样的问题。

当然,我在删除过程中删除了“.vagrant.d”文件夹。

内核版本:4.9.30-1-MANJARO

Manjaro 版本:17.0.1

Ruby 版本:ruby 2.4.1p111(2017-03-22 修订版 58053)

如果现在没有办法解决这个问题。有没有办法从 github 下载插件并手动将它们安装到 vagrant 中?

请帮助我,因为我无法安装任何 vagrant 插件。 谢谢

我解决了同样的问题,并在 serverfault 上找到了解决方案。

您必须降级包 vagrant-substrate。我使用了 AUR 包 downgrader,它为我提供了存档中的所有 vagrant-substrate 包。我选择了版本 599.d7cedfe-2(根据 link),现在它就像魅力一样。 :]

我降级了以下软件包:

$ wget https://archive.archlinux.org/packages/v/vagrant-substrate/vagrant-substrate-599.d7cedfe-2-x86_64.pkg.tar.xz
$ sudo pacman -U vagrant-substrate-599.d7cedfe-2-x86_64.pkg.tar.xz