search

Home  >  Q&A  >  body text

laravel - error when starting vagrant up from command line

A Vagrant environment or target machine is required to run this
command. Run vagrant init to create a new Vagrant environment. Or,
get an ID of a target machine from vagrant global-status to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

Environment: osx 10.11, vagrant 1.7.4
The above is the detailed error message. Although it can be solved by using vagrant up [id], it does not need to be specified before. What is the problem?

高洛峰高洛峰2842 days ago554

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 16:56:20

    Vagrant usage process (personal summary):

    1. View the local box list:

    vargant box list
    

    2. Select the box and initialize the environment:

    vagrant init [box name]
    

    It will be generated at this time.vagrant/Vagrantfile

    3. Edit Vagrantfile files, such as IP, number of CPUs, RAM

    4. Start vagrant

    vagrant up
    

    See what step you are missing.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 16:56:20

    I personally feel that it is not running in the vagrantfile directory, so this error is reported

    reply
    0
  • Cancelreply