Hi There,
Downloaded Vagrant, and went through th installation process.
When I ran vagrant -v it says vagrant: command not found
It has put the files in /opt/vagrant/...
It should install in the Applications folder with a link to the /usr/bin so it is added to the shell path.
There is no directory that has been created during this process.
I am afraid I can't even get started with it. ITs obviously not creating all the shortcuts it needs to be able to run the commands.

Hi @northstjarna
I am sorry you are having issues with Vagrant. Do you have /usr/local/bin in your $PATH? OS X El Capitan does not permit us to put files in /usr/bin anymore, so we moved to /usr/local/bin.
Hi there,
No i have no directory under usr
Andis-iMac:usr andileedavis$ ls -la
total 8
drwxr-xr-x@ 10 root wheel 340 29 Jan 14:26 .
drwxr-xr-x 35 root wheel 1258 26 Jul 09:32 ..
drwxr-xr-x 5 root wheel 170 9 Sep 2014 X11
lrwxr-xr-x 1 root wheel 3 29 Jan 14:26 X11R6 -> X11
drwxr-xr-x 1059 root wheel 36006 26 Jul 09:29 bin
drwxr-xr-x 250 root wheel 8500 5 Jul 11:08 lib
drwxr-xr-x 169 root wheel 5746 26 Jul 09:29 libexec
drwxr-xr-x 245 root wheel 8330 5 Jul 11:08 sbin
drwxr-xr-x 43 root wheel 1462 29 Jan 14:25 share
drwxr-xr-x 4 root wheel 136 29 Jan 14:21 standalone
Andis-iMac:usr andileedavis$
There seems to be an Apple issue. You may want to include a check for this directory and create it if not exists. OSX El Captain... :o)
I actually had the same issue on OSX 10.10.4 Yosemite . Vagrant was installed using the installer today.
Running the command vagrant will give me the error -bash: vagrant: command not found
I checked the content of the /usr/local/bin folder and can see vagrant in there. Using ls -la it lists vagrant as :
lrwxr-xr-x 1 root admin 24 27 Jul 01:15 vagrant -> /opt/vagrant/bin/vagrant
The /opt folder is not accessible for me. It gave me a permission denied error when I ran cd /opt/vagrant/bin. I had to manually change the permission on that folder to make vagrant work.
chmod 755 -R /opt/vagrant
More disturbing is the fact that I do not have a directory /usr/local
Definately an Apple issue.
I had to create the local directory.
sudo mkdir /usr/local
Then bin.
cd /usr/local
sudo mkdir bin
I uninstalled Vagrant, re-installed and when I ran vagrant -v I then got the version.
I had to go to that directory and then I ran the command provided by @phonicfrank
cd /usr/local/bin
ls
sudo chmod 755 vagrant
Thanks for all your help.
Weird, my /usr/local directory exists, but I had to correct the symlink in /usr/bin/vagrant from /Applications/Vagrant/something to /opt/vagrant/bin/vagrant:
$> sudo rm /usr/bin/vagrant
$> sudo ln -s /opt/vagrant/bin/vagrant /usr/bin/vagrant
This was for v1.7.4, not sure which version I upgraded from.
I just tried to install Vagrant 1.7.4 on a brand new Mac running a fresh install of Yosemite. The /usr/local/ dir tree did not exist at all (and neither, obviously, did /usr/local/bin). Vagrant claimed to install successfully but could not be found on my path.
Manually creating /usr/local/bin and rerunning the installer fixed things up. Seems like it is not safe for the installer to assume that /usr/local and /usr/local/bin exist on modern Macs.
I have Vagrant in /usr/local/bin. But it is not in my applications folder and I have to run PhpStorm via sudo and point it to the /usr/local/bin/vagrant executable for its vagrant tools to function properly. I tried uninstalling Vagrant and installing again, same result.
Vagrant 1.7.4
Mac OS X Yosemite Version 10.10.4
I had the same issue with a new MBP running Yosemite 10.10.3
I ran Vagrant's install then VirtualBox. It appeared that VirtualBox created the folder in /usr/local/bin so running the Vagrant install afterwords worked.
Fixed by https://github.com/mitchellh/vagrant-installers/pull/62 :smile:
Will the installer on the downloads page be rebuilt?
I ran into this problem today. Managed to find this link by sheer luck. I didn't have /usr/local/bin, which I had to create myself and then run vagrant installer.
I had to run hash -d vagrant to tell bash that vagrant had moved from /usr/bin/vagrant to /usr/local/bin/vagrant.
I also just ran into this issue, adding /usr/local/bin and then re-running the installer fixed it. When will the downloaded installer be updated?
One more data point:
I also had to uninstall vagrant and then create the /usr/local/bin directory and then reinstall.
I'm running 10.10.2 (14C500)
Just wanted to add.
Had the same issue installing vagrant on os 10.10.5. Had to uninstall, manually create /usr/local/bin and reinstall using installer.
Also experienced same issues on 10.10.5, fixed by creating /usr/local/bin
Just chiming in with a "me, too" on a new 10.10.5 install (technically migration from 10.10.5 on another Macbook Pro). As with the others, manually creating /usr/local/bin and reinstalling did the trick.
This for me too: my /usr/local directory exists, but I had to correct the symlink in /usr/bin/vagrant from /Applications/Vagrant/something to /opt/vagrant/bin/vagrant:
$> sudo rm /usr/bin/vagrant
$> sudo ln -s /opt/vagrant/bin/vagrant /usr/bin/vagrant
Brand new OSX 10.11 Macbook Pro, had to manually add /usr/local/bin/ before running the installer. @sethvargo , bug does not appear to be fixed according to this and the previous comments.
Another confirmation in 10.10. If /usr/local/bin doesn't exist, installation claims to succeed but the vagrant binary isn't actually installed. Running sudo mkdir -p /usr/local/bin before retrying the installation sorted it out.
I had the same problem on a brand new MacBook Pro, OSX 10.10.5 and had the same problem of the /usr/local directory not existing. I ran the following to fix it:
All is working now.
Just received this error on a brand new 13" MBP running a fresh 10.11 El Capitan install. Running @andrewmiro's instructions worked perfectly.
Same issue as as those above In 10.11. If /usr/local/bin doesn't exist, installation claims to succeed but the vagrant binary isn't actually installed. Running sudo mkdir -p /usr/local/bin before retrying the installation sorted it out.
same issue, /usr/local/ does not exist. Simply creating the folder and re-installing did the trick
Running 10.11.5. I had to set /usr/local/bin to read and writable by everyone. Seems like a security risk to me. Is there another way?
I resolove my problem with
$> sudo rm /usr/bin/vagrant
$> sudo ln -s /opt/vagrant/bin/vagrant /usr/bin/vagrant
$> sudo chmod +x /usr/bin/vargant
@zhilevan solutions fixed it for me!
In my case, the installer didn't create /usr/bin/vagrant
So I just had to create the symlink and chmod permissions.
$> sudo rm /usr/bin/vagrant = work perfectly, but I now get "default: sh: netsh: command not found" at the end uf the script. (I'm in macOS)
Any idea?
Thanks
==> default: Running triggers after up...
==> default: Executing command "vagrant ssh -c vagrant_up"...
==> default: sh: netsh: command not found
==> default: sh: cscript: command not found
==> default: It seems that you don't have the privileges to change the firewall rules. NFS will not work without that firewall
==> default: changes. Execute the following commands via cmd as administrator:
==> default: netsh advfirewall firewall add rule name="VagrantWinNFSd-1.3.1" dir="in" action=allow protocol=any program="\Users\Francois\.vagrant.d\gems\gems\vagrant-winnfsd-1.3.1\bin\winnfsd.exe" profile=any
==> default: netsh advfirewall firewall add rule name="VagrantWinNFSd-1.3.1" dir="out" action=allow protocol=any program="\Users\Francois\.vagrant.d\gems\gems\vagrant-winnfsd-1.3.1\bin\winnfsd.exe" profile=any
==> default: If you are an Windows XP user run the following command instead:
==> default: netsh firewall add allowedprogram "\Users\Francois\.vagrant.d\gems\gems\vagrant-winnfsd-1.3.1\bin\winnfsd.exe" VagrantWinNFSd-1.3.1 ENABLE
@FreudGit , did you get a solution, i also face the same problem
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Weird, my /usr/local directory exists, but I had to correct the symlink in /usr/bin/vagrant from /Applications/Vagrant/something to /opt/vagrant/bin/vagrant:
This was for v1.7.4, not sure which version I upgraded from.