鍍金池/ 問(wèn)答/PHP  網(wǎng)絡(luò)安全/ vagrant 創(chuàng)建 add laravel 報(bào)錯(cuò)

vagrant 創(chuàng)建 add laravel 報(bào)錯(cuò)

我在win10 系統(tǒng)想要安裝homestead來(lái)運(yùn)行l(wèi)aravel,但是剛安裝好,第一步
vagrant box add laravel/homestead
這個(gè)代碼就報(bào)錯(cuò)了

錯(cuò)誤內(nèi)容:

PS C:WINDOWSsystem32> vagrant box list
laravel/homestead (hyperv, 5.2.0)
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:208:in `initialize': Malformed version number string ~ (ArgumentError)

    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:199:in `new'
    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:199:in `new'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:289:in `block (2 levels) in find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:285:in `map'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:285:in `block in find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:448:in `block in with_collection_lock'
    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:447:in `with_collection_lock'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:271:in `find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/list.rb:54:in `block in list_boxes'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/list.rb:47:in `each'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/list.rb:47:in `list_boxes'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/list.rb:30:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/root.rb:66:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/cli.rb:54:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:275:in `cli'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant:156:in `<main>'

PS C:WINDOWSsystem32>

還有:
PS F:Server> vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'

box: URL: https://vagrantcloud.com/laravel/homestead

This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) parallels
2) virtualbox
3) vmware_desktop

Enter your choice: 2
==> box: Adding box 'laravel/homestead' (v6.1.0) for provider: virtualbox
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:208:in `initialize': Malformed version number string ~ (ArgumentError)

    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:199:in `new'
    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/version.rb:199:in `new'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:289:in `block (2 levels) in find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:285:in `map'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:285:in `block in find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:448:in `block in with_collection_lock'
    from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:447:in `with_collection_lock'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/box_collection.rb:271:in `find'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/box_add.rb:315:in `box_add'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/box_add.rb:283:in `add_from_metadata'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builtin/box_add.rb:118:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/warden.rb:34:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/builder.rb:116:in `call'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `block in run'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/util/busy.rb:19:in `busy'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:66:in `run'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/add.rb:78:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/commands/box/command/root.rb:66:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/cli.rb:54:in `execute'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:275:in `cli'
    from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant:156:in `<main>'

PS F:Server>

回答
編輯回答
涼汐

https://laravel-china.org/doc...

根據(jù)這個(gè)文檔 , 用離線的box安裝 5分鐘搞定~ 望采納

2017年8月9日 00:07