vagrant 创建 add laravel 报错

我在win10 系统想要安装homestead来运行laravel,但是刚安装好,第一步
vagrant box add laravel/homestead
这个代码就报错了

错误内容:

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>

阅读 3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进