vagrant: command not found after install on Mac OSX 10.10.4
Asked Answered
A

5

6

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.

I have looked for support on this issue and reported a bug.

I also accepted the xcode licence agreement.

Has anybody else had this issue. My next step is to manually create the shortcuts.

Audiometer answered 26/7, 2015 at 8:37 Comment(0)
A
6

If you look at the uninstall script including in the Vagrant DMG, it is referring to /usr/local/bin which does not exist. It should be error handling (the Vagrant pkg installer) and create it (permissions/ownership etc) but it doesn't.

You need to mkdir the /usr/local/bin. I tried a symlink between /usr/bin/vagrant (as /usr/bin exists, and in-path) to /opt/vagrant/bin/vagrant BUT this does not work, as later on in life, Vagrant refers in a hard fashion to /usr/local/bin/vagrant because its stupid.

$ sudo mkdir /usr/local/bin

If you sudo it, it should be made with correct ownership etc. Now just re-run the Vagrant installer pkg.

Accountable answered 27/7, 2015 at 12:28 Comment(0)
D
2

Make sure the Virtual Box setup is installed on Mac before installing Vagrant.

Departure answered 20/11, 2015 at 13:26 Comment(0)
A
1

I raised the bug with https://github.com/mitchellh/vagrant/issues/6034 The issue is that I had no /usr/local directory at all.

It is an apple issue. After I created the directories as you described I was able to install vagrant vitrual boax and laravel.

Here is what I did.

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.

cd /usr/local/bin ls sudo chmod 755 vagrant

Thanks for your Answer.

Audiometer answered 27/7, 2015 at 20:55 Comment(0)
W
1

Weird, on 1.8.5 I couldn't run Vagrant either, noticed that /usr/local/bin was owned by root. Ran command

# chown -R User:Group /usr/local/bin 

as root and works from my username now.

Weaponeer answered 25/9, 2016 at 21:47 Comment(0)
E
0

This is an Apple issue.

I had to create the local directory.

sudo mkdir /usr/local

sudo mkdir bin

I uninstalled and re-installed Vagrant

This worked for me

Equatorial answered 19/5 at 13:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.