11

I am trying to run a Vagrant box with SQL Server for local development. I am running Fedora 23. The box in question is this.

vagrant up fails with the following error message:

/usr/share/vagrant/plugins/communicators/winrm/shell.rb:9:in `require':
cannot load such file -- winrm (LoadError)

I have tried to install winrm with gem install winrm, and it installs just fine, but vagrant still fails.

The following ruby script runs without errors:

require "winrm"
puts "hello world"

Does anyone know how to fix this?

lalo
  • 457
  • 5
  • 16

4 Answers4

19

The winrm and winrm-fs gems are not packaged with Fedora or Debian. You can run:

$ vagrant plugin install winrm
$ vagrant plugin install winrm-fs

(i.e. vagrant plugin install, not gem install).

Note: Using Vagrant version 1.8.1, the winrm gem failed to install and this fixed it:

$ vagrant plugin install winrm --plugin-version 1.8.1
$ vagrant plugin install winrm-fs
SomeGuyOnAComputer
  • 3,408
  • 3
  • 27
  • 52
jim-minter
  • 331
  • 2
  • 8
6

Not sure what the problem was, but I fixed it by uninstalling vagrant with dnf, and installing the latest version from vagrantup.com. Seems winrm is included in the latest vagrant version.

lalo
  • 457
  • 5
  • 16
  • This was the easiest solution for me. Just `sudo apt remove vagrant` followed by a download and install of the latest .deb from the vagrantup. – Doug Bradshaw Jul 25 '18 at 15:20
5

Same resolution as here: https://groups.google.com/forum/#!topic/vagrant-up/mBYMUHm-YBI

So this is an issue with the Debian packaged version of Vagrant. Installing the DEB package from https://www.vagrantup.com/downloads.html works (both for 1.6.5 and 1.7+).

780036 has been raised with Debian to track this issue.

Ich
  • 1,241
  • 15
  • 24
  • This was the easiest solution for Debian 8 (Jessie), which throws errors (zlib, Ruby version...) if I try to do vagrant plugin install winrm... – Colin Jun 20 '17 at 17:41
4

Had the same issue: With Ubuntu Ubuntu 20.04.1 LTS running ruby 2.7.0p0 and Vagrant 2.2.6

The solution that worked for me -

$ vagrant plugin install winrm  
$ vagrant plugin install winrm-fs  
$ vagrant plugin install winrm-elevated (this additional error showed after the first two were installed)  
Luke Dunstan
  • 4,753
  • 1
  • 15
  • 14