2

I am upgrading vagrant 1.7.4 on my mac 10.9.5

After installing it, and running "vagrant -v", I got this error:

-bash: /usr/bin/vagrant: No such file or directory

I tried a couple of solutions but none worked:

  • Reinstalled VirtualBox (5.0.4), then reinstalling vagrant
  • changed permission the dir: sudo chown -R davidpell /usr/bin/vagrant
5
  • how did you install ? can you check if its present in /usr/local/bin ? Commented Oct 7, 2015 at 6:38
  • I got through that part, by resetting the disk permissions on my mac. I reinstalled virtualbox and vagrant. But now getting this error: SMB shared folders are only available when Vagrant is running on Windows. The guest machine can be running non-Windows. Please use another synced folder type. I can't find any results when I google search for an answer. Does anyone know how to resolve this? Commented Oct 7, 2015 at 15:30
  • do you have something like config.vm.synced_folder ".", "/vagrant", type: "smb" ? make sure not to use smb sharing folder type, as said can only be used if your host is on windows - maybe you can paste your whole Vagrantfile Commented Oct 7, 2015 at 16:29
  • Here is the code : I do see a parameter for "SMB". SO wont let accept that much text in the comment config.vm.provider :hyperv do |v, override| override.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :mount_options => ["dir_mode=0775","file_mode=0774","forceuid","noperm","nobrl","mfsymlinks"] # Change all the folder to use SMB instead of Virtual Box shares config.vm.synced_folders.each do |id, options| if ! options[:type] options[:type] = "smb" end end end Commented Oct 8, 2015 at 13:28
  • ok so you can remove this part config.vm.synced_folders.each do |id, options| if ! options[:type] options[:type] = "smb" end so you will leave the default and will be good to go Commented Oct 8, 2015 at 13:31

1 Answer 1

3

I think I encountered the same problem when upgrading from Vagrant 1.6.5 to 1.8.5 and it appears to be due to an old symlink from /usr/bin/vagrant -> /Applications/Vagrant/bin/vagrant

My solution was to:

  1. remove old symlink:

    sudo rm /usr/bin/vagrant
    
  2. recreate symlink to location of vagrant 1.8.5:

    sudo ln -s  /usr/local/bin/vagrant /usr/bin/vagrant
    

vagrant 1.8.5 or something in my system held-over from 1.6.x seems to depend on /usr/bin/vagrant, because even executing /usr/local/bin/vagrant directly failed with -bash: /usr/bin/vagrant: No such file or directory prior to recreating the symlink.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.