在Windows 10上降级到1.8.4后,Vagrant无法找到插件

时间:2017-05-30 12:47:25

标签: vagrant vagrant-windows

在得知我安装的最新版本的Vagrant(1.9.x)与我必须使用的流浪盒不能很好地合作之后,我已经通过首次卸载将Vagrant版本降级为1.8.5 Vagrant然后安装早期版本(1.8.5)。

之后,Vagrant变得无法使用。

$ vagrant up
Bundler, the underlying system used to manage Vagrant plugins,
is reporting that a plugin or its dependency can't be found.
This is usually caused by manual tampering with the 'plugins.json'
file in the Vagrant home directory. To fix this error, please
remove that file and reinstall all your plugins using `vagrant
plugin install`.
C:/HashiCorp/Vagrant/embedded/gems/gems/bundler1.12.5/lib/bundler/resolver.rb:356:in block in verify_gemfile_dependencies_are_found!': Could not find gem 'vagrant-vbguest x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)`

按照建议运行vagrant plugin install后,我收到同样的错误。 plugins.json不包含任何相关内容(C:\ HashiCorp \ Vagrant \ embedded \ plugins.json):

{
    "version": "1",
    "installed": {
        "vagrant-share": {
            "ruby_version": "0",
            "vagrant_version": "1.8.5"
        }
    }
}

我也注意到我没有〜/ .vagrant.d目录。有谁知道发生了什么?我尝试重新安装流浪者几次,每次都是同样的错误。

1 个答案:

答案 0 :(得分:1)

我从Vagrant 2.0.0到Vagrant 1.8.7,并遇到了同样的问题。

我删除了文件C:\ Users \ .vagrant.d \ plugins.json。

然后运行命令:vagrant plugin install gems

这解决了这个问题。