Error: can't run Vagrant executable

I've been trying to add Vagrant to a project, so that I can add the appropriate version of PHP interpreter. I've been following the Help Doc, but have run into a show stopper: Error: can't run Vagrant executable 

This may be related to https://intellij-support.jetbrains.com/hc/en-us/community/posts/206441839-Error-can-t-run-vagrant-executable

Environment: 

  • OSX 10.8.5
  • Vagrant 1.8.4
  • VBoxManage: 5.0.24r108355
  • Virtualbox: 5.0.24 r108355

What I find odd is that I can cd in to the directory and `vagrant up` the box without issue. The box is the latest version of Chassis for wordpress development based on hashicorp/precise64. If I run `vagrant box list on the directory I receive `hashicorp/precise64 (virtualbox, 1.1.0)` as a response, so the box itself seems fine.

Going through the Help DocI noticed immediately that my $PATH variable didn't include Vagrant or VBoxManage. I found this odd, as I  was able to use both packages via my shell without issue so even though they weren't appearing in the echo for $PATH, the shell was aware of them.  Regardless I manually added them using apple's path_helper, and now my paths read as follows:

$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:b0VIM 7.3:/opt/X11/bin:/usr/local/git/bin:/usr/local/bin/vagrant:/usr/local/bin/VBoxManage:/Users/anachronistic/android-sdk/platform-tools

So that part I believe is now ok, though perhaps those paths are erroneous? 

The PhpStorm Preferences for Vagrant look as follows: 



The only other thing I noted is that while setting up the remote interpreter, is the `error=13, Permission` denied on the Vagrentfile.

 

 

5 comments
Comment actions Permalink

I've since run across a SO post from someone having a similar issue with a different intellij product. Basically VBoxManage isn't where PhpStorm expects it, so one part of the solution is to make a symbolic link between those two locations. This one liner makes this initial error disappear, but still doesn't show the box that is already created in the boxes list. I also haven't been able to enable ssh, or set up an interpreter.

sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage
0
Comment actions Permalink

Hi there,

The screenshots that you are showing (first one in particular)...

First field asks: Vagrant executable -- why do you point it to Vagrantfile ??

"vagrant up" -- the vagrant executable here is "vagrant" .. so ... in the field above you should put the path to that "vagrant" (I'm not a Mac user .. but "which vagrant" should be the command to find out where "vagrant" is located).

https://confluence.jetbrains.com/display/PhpStorm/Getting+started+with+Vagrant+in+PhpStorm

0
Comment actions Permalink

Hi everyone!

I've found the vagrant executable in MacOS Sierra on the next path:

/opt/vagrant/bin/vagrant

I hope that helps.

Regards!

 

4
Comment actions Permalink

Use "which vagrant" in your terminal to locate vagrant executable. In my case it is - /usr/local/bin/vagrant

0
Comment actions Permalink

hey, it's that simple just use:

plt.show()

no thing less no thing more. & thank me later

0

Please sign in to leave a comment.