![Vagrant 共享命令丢失](https://linux22.com/image/101369/Vagrant%20%E5%85%B1%E4%BA%AB%E5%91%BD%E4%BB%A4%E4%B8%A2%E5%A4%B1.png)
我在托管 Debian Jessie 的 Ubuntu 16.04 上使用 Vagrant 1.8.1。
我已经在Atlas上设置了一个帐户,从终端登录,执行:
vagrant share
我收到带有退出代码的帮助屏幕1
。
GitHub 上似乎有一个未解决的问题这里从 16 年 1 月开始。我尝试用以下方法解决自己的问题
vagrant up --debug 2>log
但当我这样做时,日志中什么也没有出现share
。
一个可能奇怪的事情是,share
在命令中缺少该命令/usr/share/vagrant/plugins/commands
。它在使用以下命令生成的列表中也丢失了:
vagrant list-commands
也不见了在 GitHub 的同一文件夹中我在 GitHub 历史记录中没有看到它。
它并不缺少在文档尽管。
我不懂 Ruby,所以阅读 没有多大意义/usr/bin/vagrant
,但我还是读了。
更新
回复@jayhendren。
$ vagrant plugin install vagrant-share
Installing the 'vagrant-share' plugin. This can take a few minutes...
/usr/lib/ruby/2.3.0/rubygems/specification.rb:946:in `all=': undefined method `group_by' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:275:in `with_isolated_gem'
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:231:in `internal_install'
from /usr/lib/ruby/vendor_ruby/vagrant/bundler.rb:102:in `install'
from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:62:in `block in install_plugin'
from /usr/lib/ruby/vendor_ruby/vagrant/plugin/manager.rb:72:in `install_plugin'
from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:37:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `block in run'
from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:66:in `run'
from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:14:in `action'
from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:32:in `block in execute'
from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `each'
from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:31:in `execute'
from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
from /usr/bin/vagrant:173:in `<main>'
与 相同sudo
。
当我尝试安装任何其他插件时,我遇到了同样的错误。我找不到vagrant-share
任何地方都可以使用的地方。与这个不同,这样称呼:
$ vagrant plugin install vagrant-netinfo
答案1
您需要安装vagrant-share
插件:
[birdsnest ~]% vagrant plugin install vagrant-share
Installing the 'vagrant-share' plugin. This can take a few minutes...
Fetching: vagrant-share-1.1.6.gem (100%)
Installed the plugin 'vagrant-share (1.1.6)'!
[birdsnest ~]% vagrant list-commands
Below is a listing of all available Vagrant commands and a brief
description of what they do.
[...]
connect connect to a remotely shared Vagrant environment
[...]
share share your Vagrant environment with anyone in the world
[...]