Vagrant - Bash: Command not found

放肆的年华 提交于 2021-01-29 07:10:10

问题


Looking for some assistance with Vagrant, for what I believe is a Server Variable issue.

I have been trying all weekend to get any kind of Vagrant install up and running. I have followed: Laravel Homestead installation guide, and Sitepoint Homestead Vagrant VM guide.

I am using the default folders for install. Whatever I do, after installing Vagrant, I am unable to run 'vagrant up' or vagrant init' because the command 'vagrant' cannot be found (bash: vagrant: command not found). I am trying to execute from the folder with Vagrantfile in it, as suggested by Sitepoint.

I found this Stack Overflow article: Vagrant Command Stopped Working: Command not Found on Windows, but with the current version doesn't work as that bin folder is empty (note that the 'embedded' folder beside it is full, with several 'bin' folders down within the subfolder structure).

I am not familiar enough with Vagrant to know to which folder I should set the server variable, if indeed that is the right answer. It has to be simple, as no sites address this particular issue anywhere. Any assistance will be greatly appreciated.

Win 7, Vagrant 2.1.2, Virtualbox 5.2.14


回答1:


At the time of writing, Vagrant v2.1.2 is missing vagrant.exe in the i686.msi file.

There are two parts to this answer.

  • In GitBash, run commands with .\ preceeding the filename(ie .\vagrant up). See earlier comments for the credit for this answer.
  • Missing executable has been raised as an issue on Github. Without the executable, it, of course, was throwing a command not found error. https://github.com/hashicorp/vagrant/issues/10026?_pjax=%23js-repo-pjax-container

Thanks for your support Rohit.



来源:https://stackoverflow.com/questions/51231696/vagrant-bash-command-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!