PHP的-流浪了错误不起作用
作者:互联网
我试图在计算机上安装Laravel Homestead.
我遵循了文档,昨天开始工作.
但是,我让笔记本电脑处于睡眠状态,尝试运行无业游民的规定,但收到了这个奇怪的错误.
Jafars-iMac:Homestead jafarsalami$vagrant provision
/opt/vagrant/embedded/lib/ruby/2.4.0/psych.rb:377:in `parse': (<unknown>): did not find expected '-' indicator while parsing a block collection at line 18 > column 5 (Psych::SyntaxError)
from /opt/vagrant/embedded/lib/ruby/2.4.0/psych.rb:377:in `parse_stream'
from /opt/vagrant/embedded/lib/ruby/2.4.0/psych.rb:325:in `parse'
from /opt/vagrant/embedded/lib/ruby/2.4.0/psych.rb:252:in `load'
from /Users/jafarsalami/Homestead/Vagrantfile:28:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:125:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:119:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:119:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:116:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:116:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/vagrantfile.rb:28:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:810:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:810:in `vagrantfile'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:556:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:214:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:33:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:543:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:792:in `unload'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `ensure in <main>'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `<main>'
我做错了什么?
编辑:我添加了我的Homestead.yaml文件,因为它可能有助于解决此问题.
我的Homestead.yaml文件:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
type: "nfs"
sites:
- map: homestead.test
to: /home/vagrant/Code/homestead.test/public
databases:
- homestead
- – somesite_db
+ - somesite_db
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
解决方法:
在第23行的Homestead.yaml中,您有一个无效的连字符.看到它比正常的要长一些.
databases:
- homestead
- – somesite_db
+ - somesite_db
标签:homestead,vagrant,php,macos 来源: https://codeday.me/bug/20191025/1928566.html