Refer to phphub. orgtopics2 to configure according to the above prompt. When running vagrantup, the following error is reported: {code...} configuration list: homesteadup prompt: {code ...}
Reference https://phphub.org/topics/2
According to the above prompt configuration, the following error is reported when running vagrant up:
Administrator@LUHSQLSY0HHQ5J6 MINGW32 /e/home/vagrant/mytwitter$ vagrant upA Vagrant environment or target machine is required to run thiscommand.Run `vagrant init` to create a new Vagrant environment. Or,get an ID of a target machine from `vagrant global-status` to runthis command on. A final option is to change to a directory with aVagrantfile and to try again.
Configuration list:
Homestead up prompt:
C:\Users\Administrator\.homestead>homestead upC:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (
):did not find expected '-' indicator while parsing a block collection at line 23 column 5 (Psych::SyntaxError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in`parse_stream' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:318:in `parse' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:245:in `load' from C:/Users/Administrator/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:20:in`block in
' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in`call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in`load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:113:in`block (2 levels) in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in`each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in`block in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in`each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in`load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/vagrantfile.rb:28:in`initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in`new' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in`vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:486:in`host' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:208:in`block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in`call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in`run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:473:in`hook' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:722:in`unload' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in`ensure in
' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in`
'
Reply content:
Reference https://phphub.org/topics/2
According to the above prompt configuration, the following error is reported when running vagrant up:
Administrator@LUHSQLSY0HHQ5J6 MINGW32 /e/home/vagrant/mytwitter$ vagrant upA Vagrant environment or target machine is required to run thiscommand.Run `vagrant init` to create a new Vagrant environment. Or,get an ID of a target machine from `vagrant global-status` to runthis command on. A final option is to change to a directory with aVagrantfile and to try again.
Configuration list:
Homestead up prompt:
C:\Users\Administrator\.homestead>homestead upC:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (
):did not find expected '-' indicator while parsing a block collection at line 23 column 5 (Psych::SyntaxError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in`parse_stream' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:318:in `parse' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:245:in `load' from C:/Users/Administrator/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:20:in`block in
' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in`call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/v2/loader.rb:37:in`load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:113:in`block (2 levels) in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in`each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:107:in`block in load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in`each' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/config/loader.rb:104:in`load' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/vagrantfile.rb:28:in`initialize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in`new' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:740:in`vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:486:in`host' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:208:in`block in action_runner' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in`call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:33:in`run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:473:in`hook' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:722:in`unload' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in`ensure in
' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:177:in`
'
vagrant up
You mustinit
.
My general steps are:
Downloadvirtualbox.box
File
vagrant box add laravel/homestead
Then selectvirtualbox
Will be automatically downloadedvirtualbox.box
, But it is very slow. Copy the address and download it with the thunder or Baidu Network Disk. Then executeadd
Specify the path
Addbox
vagrant box add laravel/homestead
Installhomestead
composer global require "laravel/homestead=~2.2"
Then~/.composer/vendor/bin
Add to Environment Variable
Initialize and run
homestead inithomestead edit
Set the shared folder and the mapped port.
homestead up
Is there a directory in homestead?vagrant up
?
Step 1: composer require laravel/homestead
Step 2:./vendor/bin/homestead make
Step 3: vagrant up
If an error is reported, initialize vagrant init. I configured this item just now.
Initialize vagrant init in the directory as prompted, and then start vagrant up.