Kiran SR
Kiran SR

Reputation: 21

Vagrant commands failing

I am new to Vagrant!

I have installed Vagrant from https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.msi

and when i checked the version in Powershell am getting Vagrant 2.2.19. But when i am trying to add box or init am getting error.

below are the details of the error am getting

PS C:> vagrant -v
Vagrant 2.2.19

PS C:> vagrant box add ubuntu/trusty64
Vagrant failed to initialize at a very early stage:

The executable 'cmd.exe' Vagrant is trying to run was not found in the %PATH% variable. This is an error. Please verify this software is installed and on the path.

PS C:> vagrant init ubuntu/trusty64
Vagrant failed to initialize at a very early stage:

The executable 'cmd.exe' Vagrant is trying to run was not found in the %PATH% variable. This is an error. Please verify this software is installed and on the path.

I have searched on internet and youtube but did not find any help....

Please help me ...... !

FYI : I have restarted my windows 10 computer after installing Vagrant

Upvotes: 0

Views: 1760

Answers (2)

Bryant Kino
Bryant Kino

Reputation: 1

hello,i just solved this problem ,you can remove the 'cmd.exe'from the PATH ,so you should see the cmd.exe's path like this enter image description here

after this ,type 'vagrant' in your powershell ,it will run success.

Upvotes: 0

Kiran SR
Kiran SR

Reputation: 21

FOUND ANSWER :

I have done two things, firstly

   vagrant plugin update

and secondly i have edited the environment variables

[This PC (rightclick) ---> Properties ----> Advanced system settings ----> Under Advanced Tab Select Environment Variables]

In the Environment Variables window Under System variables select PATH and click on Edit ----> Click on New and add the Powershell bin path C:\Windows\System32\WindowsPowerShell\v1.0

After this i have restarted my powershell thats it.....Vagrant commands started working.

Upvotes: 2

Related Questions