2

I'm trying to install a Vagrant plugin, but got this error:

➜  ~  vagrant plugin install vagrant-bindfs
Installing the 'vagrant-bindfs' plugin. This can take a few minutes...
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:

An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
➜  ~

Then, I try to install Nokogiri:

➜  ~ gem install nokogiri -v '1.6.6.2'%
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.6.2
Parsing documentation for nokogiri-1.6.6.2
Done installing documentation for nokogiri after 2 seconds
1 gem installed
➜  ~

Then I try to install vagrant plugin again, it says the same thing:

Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.

Same happens when trying to install any vagrant plugin.

I'm on OSX Yosemite with Vagrant 1.6.3.

Am I doing something wrong?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
anderlaini
  • 1,593
  • 2
  • 24
  • 39

2 Answers2

1

Looking at other people with same issue, it appears you need an environment variable set for Nokogiri:

Vagrant cannot install nokogiri-dependent plugins

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 

Also, any reason you're using Vagrant 1.6.3 as apparently this issue is fixed in version 1.7.2 and above:

https://github.com/mitchellh/vagrant/issues/3769

Community
  • 1
  • 1
timothyclifford
  • 6,799
  • 7
  • 57
  • 85
1

Consider upgrading Vagrant to latest version.

I was still struggling with this with Vagrant 1.6.3 even after using env variable suggestion in other answer.

Upgraded Vagrant to most recent version (1.7.2) and plugin install now works.

Toby Sullivan
  • 198
  • 10