windows 上的 Vagrant 安装问题

Problem with Vagrant Installation on windows

我打算使用 homestead 在 Windows 上开发一个 laravel 应用程序。 所以我安装了 VirtualBox,然后安装了 Vagrant,一切顺利。 但是,当我在命令行中键入 vagrant 并按 Enter 键时,为了确保它正常工作,我看到了这个错误:

Traceback (most recent call last):
        2: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/bin/vagrant:111:in `<main>'
        1: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- vagrant (LoadError)
        32: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/bin/vagrant:111:in `<main>'
        31: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:147:in `require'
        30: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:158:in `rescue in require'
        29: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:158:in `require'
        28: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:338:in `<top (required)>'
        27: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:338:in `each'
        26: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:346:in `block in <top (required)>'
        25: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:346:in `each'
        24: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:329:in `block in <top (required)>'
        23: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant.rb:329:in `load'
        22: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/commands/cloud/plugin.rb:2:in `<top (required)>'
        21: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        20: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        19: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/vagrant_cloud-3.0.5/lib/vagrant_cloud.rb:1:in `<top (required)>'
        18: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        17: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        16: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/excon-0.85.0/lib/excon.rb:38:in `<top (required)>'
        15: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        14: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        13: from C:/HashiCorp/Vagrant/embedded/gems/2.2.18/gems/excon-0.85.0/lib/excon/socket.rb:2:in `<top (required)>'
        12: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        11: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
        10: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/resolv.rb:38:in `<top (required)>'
         9: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/resolv.rb:168:in `<class:Resolv>'
         8: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/resolv.rb:171:in `<class:Hosts>'
         7: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
         6: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
         5: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/win32/resolv.rb:7:in `<top (required)>'
         4: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
         3: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
         2: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/win32/registry.rb:4:in `<top (required)>'
         1: from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/win32/registry.rb:72:in `<module:Win32>'
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/win32/registry.rb:72:in `find': unknown encoding name - CP720 (ArgumentError)

我已经安装了 VirtualBox 6.1.26 和 Vagrant 2.2.18 64 位。我的 Windows 上启用了虚拟化。我也禁用了 hyper-v。 有谁知道哪里出了问题吗?

解决方案#1

降低应用版本 从 6.1.26 到虚拟框 5.1.26 和 流浪者 2.0.0 来自 2.2.18

解决方案#2

重新安装应用程序