Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant up gives 'cygpath' Vagrant was not found in path

I've installed Vagrant, Vagrant init worked fine. When I now run Vagrant up I get this error:

The executable 'cygpath' 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.

Im using cygwin as terminal and I have windows 8, and I've placed C:\cygwin64\bin in my PATH in envoirment variables.

My question is, why do I get this error message when I've specified the path to my cygwin bin?

Thanks!

like image 365
user2354898 Avatar asked Nov 25 '15 20:11

user2354898


2 Answers

My soultion was to create a small wrapper script, vagrant.bat:

@setlocal
@set PATH=C:\HashiCorp\Vagrant\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
@vagrant %*
@endlocal

The vagrant.bat file is in a directory that is first in my PATH.

like image 183
slu Avatar answered Nov 05 '22 14:11

slu


I am assuming you have Cygwin installed, simply add the path to cygwin (usually c:\cygwin\bin\cygwin.exe) to your shells %path% variable and you should be ready to go.

  • Ctrl-X => System => Advanced Settings => Variables
  • Restart your Powershell/Cmd-Window
like image 28
Christian Richter Avatar answered Nov 05 '22 13:11

Christian Richter