gpt4 book ai didi

vagrant - 尝试 vagrant up 时阻止 windows_hyperv_admin 错误

转载 作者:行者123 更新时间:2023-12-04 22:43:27 26 4
gpt4 key购买 nike

我在我的环境中使用 Vagrant,但我遇到了一个小问题,如下所示。

kk@Lenovo MINGW64 ~/sravz/vm1
$ vagrant up
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:85:in `block in windows_hyperv_admin?': undefined method `include?' for #<Vagrant::Util::Subprocess::Result:0x2634e88> (NoMethodError)
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/util/platform.rb:89:in `windows_hyperv_admin?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/plugins/providers/hyperv/provider.rb:20:in `usable?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:381:in `block in default_provider'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/environment.rb:379:in `each'

我已经用 vagrant init 初始化了我的项目,但由于某种原因 vagrant up 拒绝工作。

最佳答案

我有同样的问题,正如@Frédéric Henri 提到的,这与这个问题有关:https://github.com/mitchellh/vagrant/issues/7465 .

我只是按照其中一条评论中提出的建议进行操作,现在工作正常:)

I had the same issue (initially thought it was because of Hyper-V, which I already uninstalled and the errors remained). But if you installed Virtualbox today, the issue is probably because 5.1 has just been released a few hours ago (creating an environment variable VAGRANT_DEFAULT_PROVIDER set to "virtualbox" shows a message that says it only supports up to 5.0).

*Uninstall 5.1, and install Virtualbox 5.0.x instead until that issue is closed, that fixed it for me.



您可以找到旧版本 here .对于 5.0.x。具体来说, here .

关于vagrant - 尝试 vagrant up 时阻止 windows_hyperv_admin 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38181341/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com