There is no problem not worth solving, and no technology not worth learning!

When starting Vagrant, an error is reported: psych.rb:456:in `parse: (): found a tab character that violates indentation while scanning a plain scalar at line 10 Column 7 (Psych::SyntaxError)

启动 vagrant 时,报错:D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse': (): found a tab character that violates indentation while scanning a plain scalar at line 10 column 7 (Psych::SyntaxError)

1. When starting Vagrant, an error is reported: D:/Program files/hashicorp/vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse: (): found a tab character that violates indentation while scanning a plain scalar at line 10 Column 7 (psych::SyntaxError). as shown in Figure 1

启动 vagrant 时,报错:D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse': (<unknown>): found a tab character that violates indentation while scanning a plain scalar at line 10 column 7 (Psych::SyntaxError)
Figure 1
Administrator@PC MINGW64 ~/Homestead (v13.2.1)
$ vagrant up
D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse': (<unknown>): found a tab character that violates indentation while scanning a plain scalar at line 10 column 7 (Psych::SyntaxError)
        from D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse_stream'
        from D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:390:in `parse'
        from D:/Program Files/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:277:in `load'
        from C:/Users/Administrator/Homestead/Vagrantfile:29:in `block in <top (required)>'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/v2/loader.rb:37:in `load'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:126:in `block (2 levels) in load'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `each'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `block in load'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `each'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `load'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:29:in `initialize'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `new'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `vagrantfile'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:974:in `process_configured_plugins'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:178:in `initialize'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `new'
        from D:/Program Files/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `<main>'
 
 
 

2. View the file ~/homestead/homestead.yaml in phpstorm, and find a red wavy line prompt. The reason may be that it has been edited with EditPlus before. as shown in Figure 2

在 PhpStorm 中查看文件 ~/Homestead/Homestead.yaml,发现有下划红色波浪线提示。原因可能在于之前使用 EditPlus 编辑过
Figure 2

3. Decide to reformat the file ~/homestead/homestead.yaml. as shown in Figure 3

决定重新格式化文件 ~/Homestead/Homestead.yaml
Figure 3

4. After formatting, there is no longer a red wavy line prompt. as shown in Figure 4

格式化后,不再有下划红色波浪线提示
Figure 4

5. When vagrant is started again, an error will not be reported.

Need long-term technical maintenance or remote troubleshooting?

I am a PHP / Go backend engineer with 15+ years of experience, focused on existing system maintenance, bug fixing, performance optimization, server troubleshooting, WordPress maintenance, and small feature iterations.

If your project is facing any of the following issues, we can start with a small troubleshooting task first:

  • ✅ PHP / Laravel / Yii2 legacy systems without active maintenance
  • ✅ Go / Gin backend APIs that need troubleshooting or optimization
  • ✅ Slow, broken, or unstable WordPress websites
  • ✅ Nginx / MySQL / Redis / Linux server issues
  • ✅ CDN / Cloudflare / DNS / HTTPS configuration problems
  • ✅ Long-term remote technical support or part-time maintenance

More details: About Me & Collaboration

WeChat: 13980074657
Email: shuijingwanwq@gmail.com
Telegram: @shuijingwan
GitHub: https://github.com/shuijingwan

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.