Problem with vagrant in Windows Linux Subsytem - vagrant

I am having a problem after I installed vagrant on Windows Linux Subsytem.
I know that vagrant is installed because I checked vagrant -v.
Vagrant 2.2.7
But every command I give from vagrant it executes the same error.
/opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/which.rb:37: warning: Insecure world writable dir /home/tiedmud/.rvm/gems/ruby-2.5.1 in PATH, mode 040777
/opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:1059:in `chmod': Operation not permitted # chmod_internal - /mnt/c/Users/ricar/.vagrant.d/insecure_private_key (Errno::EPERM)
from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:1059:in `chmod'
from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:1059:in `copy_insecure_private_key'
from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:166:in `initialize'
from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:154:in `new'
from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:154:in `<main>'
Can someone help me?

I think you upgraded Vagrant from 1.0 to higher version.Please remove old version and reinstall.
RubyGemmethod is gone.
Installing Vagrant
Installing Vagrant is extremely easy. Head over to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system.
The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).
`Looking for the gem install? Vagrant 1.0.x had the option to be installed as a RubyGem. This installation method is no longer supported. If you have an old version of Vagrant installed via Rubygems, please remove it prior to installing newer versions of Vagrant.
Use this login as root on safe mode

Related

Error: No such file or directory # rb_sysopen - C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt

In my windows 10, after I installed
​vagrant plugin install vagrant-vmware-desktop
then i execute vagrant up I get error:1
>vagrant up
Vagrant encountered an error while attempting to load the utility
service key file. This error can occur if the Vagrant VMware Utility
has not yet been installed, or if it was installed incorrectly. If
this error persists after running the Vagrant VMware Utility installer
again, please contact support at: support#hashicorp.com
Information about the Vagrant VMware Utility, including installation
instruction, can be found here:
https://www.vagrantup.com/docs/vmware/vagrant-vmware-utility.html
Path: C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt
Error: No such file or directory # rb_sysopen - C:/ProgramData/hashicorp/vagrant-vmware-desktop/certificates/vagrant-utility.client.crt
It seems the Vagrant Vmware utility is missing, you can run the following command and check if the Vmware utility service is running or not
net start vagrant-vmware-utility
If it is not present, install it from here for windows. you can look for other links for different platforms.
Once installed re-install the utility -
vagrant plugin install vagrant-vmware-desktop
After installation is complete you should have a folder similar to this:
C:\HashiCorp\VagrantVMwareUtility

vagrant update 1.8.1 to 1.8.5

I have installed vagrant 1.8.1 in fedora 24, this version not support for virtuvalbox 5.1, System throw this error:
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.
I eared vagrant 1.8.5 support for virtual box 5.1. so I need to update vagrant 1.8.1 to vagrant 1.8.5 (not download Here)
Suggest me how to do this in fedora 24.
If you are trying to use Vagrant on Fedora (dnf install vagrant) and get this error message when trying to use it (No usable default provider could be found), try setting it in your ~/.bashrc:
export VAGRANT_DEFAULT_PROVIDER=virtualbox
For fedora, you can download the rpm at https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5_x86_64.rpm and install the rpm.

Bundler error whilst trying to install Varying Vagrant Vagrants and Vagrant plug-ins

I am new to Vagrant, Laraval, and Varying Vagrant Vagrants. I am attempting to get this environment installed and operational. I am on Mac OS X 10.11.6.
I am following the instructions posted here.
Step 1 is install VirtualBox 5.0.x. Done that.
Step 2 is install Vagrant 1.8.5. Done that.
After installing Vagrant with the pgk file I downloaded... I created a directory at ~/vagrant. In that directory I did a vagrant init hashicorp/precise64 command. I then vagrant up.
Step 3 Install the vagrant-hostsupdater plugin with vagrant plugin install vagrant-hostsupdater
When I try to do this, I get the following error:
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
There was an error while trying to write to
/Users/jonathan/.bundle/cache/compact_index/gems.hashicorp.com.443.68db9b3ad4be8461ccdecca2ae96d12a.
It is likely that you need to grant write permissions for that path.
Warning: this Gemfile contains multiple primary sources. Using
source more than once without a block is a security risk, and may
result in installing unexpected gems. To resolve this warning, use a
block to indicate which gems should come from the secondary source. To
upgrade this warning to an error, run bundle config
disable_multisource true.
Just to see if it made any difference, I changed the permissions on that file to 777. The same error occurs though.
I also get this error if I try to install any of the other plugins mentioned in the instructions on the VVV site.
I have no idea why this occurs, or what to do about it.
Any suggestions would be greatly appreciated.
Whilst I don't know the original cause of the issue, the came to light through my discussion (in comments) with Frédéric Henri.
For some reason the permissions on the ~/.bundle file had the owner set to root.
This was preventing the Vagrant plug-ins from installing. To correct this issue I changed the owner to my username.
From the home folder (cd ~/) use the following command, sudo chown -R <USERNAME>:staff ~/.bundle
This resolved the issue.

vagrant plugin install fails for any plugin

Running vagrant plugin install [plugin] fails for any plugin (using an admin command prompt.) Not sure what the problem is. dev/null is not on my machine and it shouldn't be trying to install to a VM.
Tried:
Uninstall Vagrant, delete .vagrant.d directory, reinstall Vagrant
Update Vagrant's gems using its embedded Ruby
Update VirtualBox
Disable .bashrc file (tried it with Git Bash, too)
Using:
Windows 7 Pro x64 SP1
Vagrant 1.7.2
VirtualBox 4.3.26
Output:
Note: ** = C:/HashiCorp/Vagrant/embedded
C:\Users\Joe\Dropbox\webdev\projects>vagrant plugin install vagrant-hostsupdater
Installing the 'vagrant-hostsupdater' plugin. This can take a few minutes...
**/lib/ruby/2.0.0/rubygems/user_interaction.rb:554:in \`initialize':
Is a directory - /dev/null (Errno::EISDIR)
from **/lib/ruby/2.0.0/rubygems/user_interaction.rb:554:in \`open'
from **/lib/ruby/2.0.0/rubygems/user_interaction.rb:554:in \`initialize'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/bundler.rb:283:in \`new'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/bundler.rb:283:in \`with_isolated_gem'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/bundler.rb:225:in \`internal_install'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/bundler.rb:92:in \`install'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/plugin/manager.rb:62:in \`block in install_plugin'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/plugin/manager.rb:72:in \`call'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/plugin/manager.rb:72:in \`install_plugin'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/action/install_gem.rb:37:in \`call'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in \`call'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in \`call'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in \`block in run'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in \`busy'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in \`run'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/command/base.rb:14:in \`action'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/command/install.rb:32:in \`block in execute'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/command/install.rb:31:in \`each'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/command/install.rb:31:in \`execute'
from **/gems/gems/vagrant-1.7.2/plugins/commands/plugin/command/root.rb:56:in \`execute'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/cli.rb:42:in \`execute'
from **/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:301:in \`cli'
from **/gems/gems/vagrant-1.7.2/bin/vagrant:174:in \`<main>'
Check if there is a c:\dev\null directory (or maybe d:\dev\null etc).
initialize scripts looks for a /dev/null file but finds a directory. By deleting the directory everything works fine(it did to me)
Seems that some other linux ported application had created the c:\dev\null folder

Failed to find Vagrant

Trying to install Vagrant on Windows 7 X64 with installer from Vagrant - vagrant_1.7.0.msi
Installation goes fine, however unable to use vagrant. On any command, for example vagrant -v the below is shown:
Failed to find Vagrant!
What I did:
Googled. Only 1 link with such an error on github regarding to installer. Not sure if this is relevant.
Checked that vagrant in PATH. Yes it is. Otherwise it would not start at all.
Reinstalled, and repaired - few times.
All the above with no luck. Any idea where to dig?
Thank you.
just to add my own version of this problem too:
i installed version 1.7.0
error message after a "vagrant up": "Failed to find Vagrant!"
checked paths, other environment variables in win7, should work..
so i uninstalled it and installed an older version (1.6.5)
and yes, the older version solved the problem.
i got it from their official website: https://www.vagrantup.com/download-archive/v1.6.5.html
i guess the problem was in this file:
https://github.com/mitchellh/vagrant-installers/blob/master/substrate/launcher/main.go
Same Issue on Windows 7 64.
Downgraded back to Vagrant 1.6.5
Have you gone through the installation instructions on vagrant side listed here :
https://docs.vagrantup.com/v2/installation/index.html
This is what I see listed at their site:
The installer will automatically add vagrant to your system path so that it is available in terminals. If it is not found, please try logging out and logging back in to your system (this is particularly necessary sometimes for Windows).
Please try running it from Git Bash too and let me know if it works for you.
And if you still run into issues, try using an older version of vagrant https://www.vagrantup.com/download-archive/v1.6.5.html
Vagrant 1.7.1 should fix this. https://github.com/mitchellh/vagrant/issues/4924#issuecomment-66808666

Resources