我试着安装了几次phpmyadmin,但是失败了。我一直在修改宅基地.yaml,但是当我尝试命令vagrant reload --provision
时,vagrant总是给我一个错误。Vagrant对我来说是一个普通的laravl项目。
homestead.yaml
---
folders:
- map: E:\projects
to: /home/vagrant/code
- map: E:\projects\phpmyadmin
to: /home/vagrant/code/phpmyadmin
sites:
- map: dev-cms.com
to: /home/vagrant/code/new-blog/public
- map: phpmyadmin.test
to: /home/vagrant/code/new-blog/phpmyadmin
databases:
- homestead
键入vagrant reload --provision
时出现不定错误
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse': (<unknown>): mapping values are not allowed in this context at line 22 column 9 (Psych::SyntaxError)
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse_stream'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:390:in `parse'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:277:in `load'
from C:/Users/User/Homestead/Vagrantfile:29:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/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 C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:29:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:974:in `process_configured_plugins'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:178:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `<main>'
宿主Windows文件
192.168.56.56 dev-cms.com
127.0.0.1 phpmyadmin.test
1条答案
按热度按时间bakd9h0s1#
问题中提供的yaml有一些缩进问题,您可以查看yaml lint来验证您的yaml文件。
以下一项将有效
注:
to: /home/vagrant/code/new-blog/phpmyadmin