vagrant plugin install fails for any plugin - ruby

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

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

Problem with vagrant in Windows Linux Subsytem

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

Vagrant. The box you're attempting to add doesn't support the provider you requested

I created a vagrant box using vagrant package , uploaded it and released it.
Then I did vagrant init <username>/<box> which created a Vagrantfile. I even appended the box version to the Vagrantfile.
Next I did vagrant up --provider virtualbox. This tries to get the box locally and then when it can't find it, i get the error:
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Atlas, make sure the box is
released.
I have given virtualbox as the provider and virtual box works fine with other boxes I use.
Make sure you have virtualbox installed if you are using ubuntu.
sudo apt install virtualbox-qt
What I figured was that due to some reason vagrant had got corrupted. So doing a fresh install of vagrant did the trick.
Upgrading vagrant version through installing .deb version worked for me (download through vagrant website: https://www.vagrantup.com/downloads - choose tab "Debian" and install the package)
I suffered for 2 hours but I don't want anyone to suffer ;)
1 - access the terminal (sudo) and, remove vagrant files
$ rm -rf /opt/vagrant
$ rm -f /usr/bin/vagrant
2 - then install it again as it has probably been corrupted.
$ curl -O https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.deb
3 - install vagrant
$ sudo apt install ./vagrant_2.2.9_x86_64.deb
4 - confirm by viewing the installed vagrant version
& vagrant --version
be happy

vagrant is not a recognised internal/external command

I have cloned a repository from Github following a course on Udacity. It contains a vagrant file and according to the tutorial I shoulld use vagrant up command to get the virtual machine started. But it says that vagrant is not a recognized internal/external command. How can I fix this?
Install Vagrant for Windows, if your machine OS is windows.
https://www.vagrantup.com/downloads.html
Restart computer.
Install Virtualbox from Virtualbox SDK
https://www.virtualbox.org/wiki/Downloads
VirtualBox 5.2.6 platform packages. The binaries are released under the terms of the GPL version 2.
Windows hosts
Once Virtual box is installed, run the command on the cmd prompt.
vagrant up --provision
I'm in the same course on Udacity and I think the issue you are having can be resolved by adding C:\Hashicorp\Vagrant\bin to your system variables path.
Instructions for editing your path can be found here: Where can I set path to make.exe on Windows?
This fixed the error for me.

Vagrant 'box could not be found' error

I've installed Vagrant and VirtualBox to simulate Hadoop management (Apache Ambari). According to its installing documentation, i've done everything to create a vm (with 'vagrant up' command). I've installed manually lucid32 box file and placed it to the directory but it still says:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The box 'lucid32' could not be found.
What am i doing wrong?
I was able to get a box up using the latest install following this process.
# From your home directory, install the template box
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
# From your project directory
vagrant init lucid32
vagrant up
Using Apache Ambari:
# clone from GitHub
git clone https://github.com/u39kun/ambari-vagrant.git
# Append these entries to ambari-vagrant/append-to-etc-hosts.txt
# ubuntu 12.4 hosts
192.168.12.101 u1201.ambari.apache.org u1201
192.168.12.102 u1202.ambari.apache.org u1202
192.168.12.103 u1203.ambari.apache.org u1203
192.168.12.104 u1204.ambari.apache.org u1204
192.168.12.105 u1205.ambari.apache.org u1205
192.168.12.106 u1206.ambari.apache.org u1206
192.168.12.107 u1207.ambari.apache.org u1207
192.168.12.108 u1208.ambari.apache.org u1208
192.168.12.109 u1209.ambari.apache.org u1209
192.168.12.110 u1210.ambari.apache.org u1210
# Modify your hosts file
sudo cat ambari-vagrant/append-to-etc-hosts.txt >> /etc/hosts
# Get up and running
cd ambari-vagrant/ubuntu12.4
vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:
vm:
* The box 'hashicorp/precise64' could not be found.
For me, this was a simple matter of using too old a version of vagrant (version 1.0.1).
Download the latest from: https://www.vagrantup.com/downloads.html
And then:
$ sudo dpkg -i vagrant_1.8.5_x86_64.deb

Resources