Laravel vagrant up 错误

Laravel vagrant up errors

我正在尝试根据此处的文档在 windows 机器上设置 Laravel homestead:http://laravel.com/docs/5.0/homestead#installation-and-setup

然而,当我到达“Launch The Vag运行t Box”步骤时,当我尝试从 cmd 'vagrant up' 时出现以下错误:

D:/Homestead/scripts/homestead.rb:4:in `configure': undefined method `[]' for false:FalseClass (NoMethodError)
    from D:/Homestead/Vagrantfile:18:in `block in <top (required)>'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `load'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `each'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `block in load'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `each'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `load'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/vagrantfile.rb:28:in `initialize'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `new'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `vagrantfile'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:441:in `host'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:207:in `block in action_runner'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `run'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:428:in `hook'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:673:in `unload'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `ensure in <main>'
    from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `<main>'

如果我使用 Cygwin 来 'Vagrant up',我会得到这个错误:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'laravel/homestead' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/laravel/homestead"]
Error: Could not resolve host: (nil); Host not found

我应该使用 Cygwin 还是 cmd?

如何修复这些错误?我在 cmd 中成功 运行'Vag运行t box'(指向本地 .box 文件,因为我在代理后面),我应该 运行 它在 Cygwin 中吗?

编辑:

好的,所以如果我用 'C:/Users/[username]/' 替换“~”,这会在 cmd 中将其 运行ning 与在 Cygwin 中的 运行ning 内联,所以现在两者都给出相同的结果错误。

问题是我用过

vagrant box add laravel [location]

而不是

vagrant box add laravel/homestead [location]