问题
I am new with Vagrant. My supervisor want me to run a website. First of all he told me to install VirtualBox and Vagrant. He sent me bootstrap.sh and Vagrantfile files. He told me to copy this in a folder called "data_repo". After that he told me to run "vagrant up" command from "data_repo". I did that but it is giving me following error:
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.
Could you please let me know the way to fix it?
回答1:
I had the same problem on a Windows machine and I solved it this way: rename the file Vagrantfile.txt to Vagrantfile (without .txt).
回答2:
I had same problem on linux system. By mistake I deleted Vagrantfile file.
回答3:
There should be only one Vagrantfile. Make sure you have Vagrantfile (V capital and no extension) in that folder(data_repo).
Follow the documentation here
https://www.vagrantup.com/docs/getting-started/
来源:https://stackoverflow.com/questions/31731534/vagrant-up-command-issue