Vagrant up 启动失败怎么破?

Vagrant up 启动失败。
错误提示如下

C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:377:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 11 column 5 (Psych::SyntaxError)
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:377:in `parse_stream'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:325:in `parse'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:252:in `load'
        from C:/Users/zdst-xuqiu/Homestead/Vagrantfile:28:in `block in <top (required)>'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/v2/loader.rb:37:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/loader.rb:126:in `block (2 levels) in load'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/loader.rb:119:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/loader.rb:119:in `block in load'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/loader.rb:116:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/config/loader.rb:116:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/vagrantfile.rb:28:in `initialize'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:777:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:777:in `vagrantfile'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:523:in `host'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:191:in `block in action_runner'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/action/runner.rb:33:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:510:in `hook'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/lib/vagrant/environment.rb:759:in `unload'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant:159:in `ensure in <main>'
        from C:/HashiCorp/Vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant:159:in `<main>'
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 4

我也出现同样的错误,网上找不到解决办法,但发现我的homestead.yaml配置文件有错误。如下第二个站点to没有缩进。

sites:

  • map: homestead.test
    to: /home/vagrant/code/laravel55/public

  • map: logo.homestead.test
    to: /home/vagrant/code/logo
5年前 评论

语法错误 while scanning a simple key at line 11 column 5 11行 5列

5年前 评论

@leantheme_com 我和你出现了同样的问题,错误的原因是“- map”前面是四个空格,而不是直接tab

5年前 评论
chenvle

@cheng_cm 正解

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!