New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install plugins that depend on nokogiri in Vagrant 1.6+ #3769

Closed
lox opened this Issue May 13, 2014 · 170 comments

Comments

Projects
None yet
@lox

lox commented May 13, 2014

Since installing Vagrant 1.6.0, I'm unable to install landrush, or other plugins that depend on nokogiri:

I initially thought this was a landrush issue, but have reproduced with other vagrant plugins:

vagrant-landrush/landrush#69

I tested 1.6.1 and 1.6.2, both of which fail the same way. Reverting to 1.5.4 fixes the problem.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 13, 2014

Member

Could you share the logs? The underlying installer foundation didn't change at all between 1.5 and 1.6, which makes this odd.

Member

mitchellh commented May 13, 2014

Could you share the logs? The underlying installer foundation didn't change at all between 1.5 and 1.6, which makes this odd.

@lox

This comment has been minimized.

Show comment
Hide comment
@lox

lox May 13, 2014

Which logs shall I include? The landrush bug has a trace of the output. It's certainly strange, in that I'm sure it's been working fine for several days, but suddenly today our CI system and my own installation started to have the same issue. Entirely possible it's a bug elsewhere.

lox commented May 13, 2014

Which logs shall I include? The landrush bug has a trace of the output. It's certainly strange, in that I'm sure it's been working fine for several days, but suddenly today our CI system and my own installation started to have the same issue. Entirely possible it's a bug elsewhere.

@AlexeyPopov

This comment has been minimized.

Show comment
Hide comment
@AlexeyPopov

AlexeyPopov May 13, 2014

I have same error with "vagrant plugin update" command.

Error log:

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.2), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.6.2' succeeds before bundling.

AlexeyPopov commented May 13, 2014

I have same error with "vagrant plugin update" command.

Error log:

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.2), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.6.2' succeeds before bundling.

@jonbuffington

This comment has been minimized.

Show comment
Hide comment
@jonbuffington

jonbuffington May 13, 2014

Same issue here:

$ vagrant --version
Vagrant 1.6.2

$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.0.1, system)
vagrant-vmware-fusion (2.4.1)

$ vagrant plugin update vagrant-vmware-fusion
Updating plugins: vagrant-vmware-fusion. This may take a few minutes...
Building nokogiri using packaged libraries.
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.

jonbuffington commented May 13, 2014

Same issue here:

$ vagrant --version
Vagrant 1.6.2

$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.0.1, system)
vagrant-vmware-fusion (2.4.1)

$ vagrant plugin update vagrant-vmware-fusion
Updating plugins: vagrant-vmware-fusion. This may take a few minutes...
Building nokogiri using packaged libraries.
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.
@arosenhagen

This comment has been minimized.

Show comment
Hide comment
@arosenhagen

arosenhagen May 13, 2014

I run into this as well with vagrant 1.6.0, 1.6.1 and 1.6.2.
Downgrading to 1.5.4 helps (but well..not really ;-))

$ vagrant plugin install vagrant-omnibus
Installing the 'vagrant-omnibus' plugin. This can take a few minutes...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.

arosenhagen commented May 13, 2014

I run into this as well with vagrant 1.6.0, 1.6.1 and 1.6.2.
Downgrading to 1.5.4 helps (but well..not really ;-))

$ vagrant plugin install vagrant-omnibus
Installing the 'vagrant-omnibus' plugin. This can take a few minutes...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.
@robsonpeixoto

This comment has been minimized.

Show comment
Hide comment
@robsonpeixoto

robsonpeixoto May 13, 2014

The same problem:

$ rm -rf ~/.vagrant.d
$ vagrant plugin update
Updating installed plugins...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.

robsonpeixoto commented May 13, 2014

The same problem:

$ rm -rf ~/.vagrant.d
$ vagrant plugin update
Updating installed plugins...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
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.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2'` succeeds before bundling.
@arosenhagen

This comment has been minimized.

Show comment
Hide comment
@arosenhagen

arosenhagen May 13, 2014

FYI: this might be caused by the recent upgrade of the nokogiri gem to 1.6.2
A quick workaround would be to pin the nokogiri gem version.
Unfortunately I don't know where the gem is required/bundled by vagrant :-/

arosenhagen commented May 13, 2014

FYI: this might be caused by the recent upgrade of the nokogiri gem to 1.6.2
A quick workaround would be to pin the nokogiri gem version.
Unfortunately I don't know where the gem is required/bundled by vagrant :-/

@arosenhagen

This comment has been minimized.

Show comment
Hide comment
@arosenhagen

arosenhagen May 13, 2014

Quick fix: add s.add_dependency(%q<nokogiri>, ["< 1.6.2"]) to ~/Applications/Vagrant/embedded/gems/specifications/vagrant-1.6.2.gemspec

arosenhagen commented May 13, 2014

Quick fix: add s.add_dependency(%q<nokogiri>, ["< 1.6.2"]) to ~/Applications/Vagrant/embedded/gems/specifications/vagrant-1.6.2.gemspec

@MisumiRize

This comment has been minimized.

Show comment
Hide comment
@MisumiRize

MisumiRize May 13, 2014

Installing nokogiri gem with system installed libxml2 is temporal solution for this issue.

  1. Install libxml2 to system.
  2. Run export NOKOGIRI_USE_SYSTEM_LIBRARIES=true.
  3. Then try vagrant plugin update.

MisumiRize commented May 13, 2014

Installing nokogiri gem with system installed libxml2 is temporal solution for this issue.

  1. Install libxml2 to system.
  2. Run export NOKOGIRI_USE_SYSTEM_LIBRARIES=true.
  3. Then try vagrant plugin update.
@fgrehm

This comment has been minimized.

Show comment
Hide comment
@fgrehm

fgrehm May 13, 2014

Collaborator

I've seen this happen when installing a pre-release version of vagrant-lxc and a user has just reported it as well.

Funny fact is that vagrant-lxc has no gem dependencies at all oO

Collaborator

fgrehm commented May 13, 2014

I've seen this happen when installing a pre-release version of vagrant-lxc and a user has just reported it as well.

Funny fact is that vagrant-lxc has no gem dependencies at all oO

@clarkbk

This comment has been minimized.

Show comment
Hide comment
@clarkbk

clarkbk May 13, 2014

Yep, I'm seeing this issue as well when attempting to install vmware_fusion /cc @josegonzalez

clarkbk commented May 13, 2014

Yep, I'm seeing this issue as well when attempting to install vmware_fusion /cc @josegonzalez

@clarkbk

This comment has been minimized.

Show comment
Hide comment
@clarkbk

clarkbk May 13, 2014

Confirmed that a downgrade works, though the export trick doesn't, and the s.add_dependency method doesn't work if you've deleted your .vagrant.d directory.

clarkbk commented May 13, 2014

Confirmed that a downgrade works, though the export trick doesn't, and the s.add_dependency method doesn't work if you've deleted your .vagrant.d directory.

@clarkbk

This comment has been minimized.

Show comment
Hide comment
@clarkbk

clarkbk May 13, 2014

And now attempting to install vagrant-berkshelf in 1.5.4 also gives me the same error...

clarkbk commented May 13, 2014

And now attempting to install vagrant-berkshelf in 1.5.4 also gives me the same error...

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 13, 2014

Member

Ah, I wonder if this is caused by 1.6 adding the vagrant-windows dependencies which have a Nokogiri aspect.

Member

mitchellh commented May 13, 2014

Ah, I wonder if this is caused by 1.6 adding the vagrant-windows dependencies which have a Nokogiri aspect.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh
Member

mitchellh commented May 13, 2014

/cc @sneal

@mitchellh mitchellh added the bug label May 13, 2014

@drpebcak

This comment has been minimized.

Show comment
Hide comment
@drpebcak

drpebcak May 13, 2014

I'm hitting this issue as well with vagrant-cachier, vagrant-omnibus, AND vagrant-hostsupdater

drpebcak commented May 13, 2014

I'm hitting this issue as well with vagrant-cachier, vagrant-omnibus, AND vagrant-hostsupdater

@c0rn0

This comment has been minimized.

Show comment
Hide comment
@c0rn0

c0rn0 May 13, 2014

Downgrading to 1.5.4 doesn't work for me. After the downgrade when running vagrant plugin install vagrant-aws I still get the:

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

Is there another version you guys downgraded to? Also how do you delete the current installation, by just deleting the /Applications/Vagrant directory and the /usr/bin/vagrant binary?

c0rn0 commented May 13, 2014

Downgrading to 1.5.4 doesn't work for me. After the downgrade when running vagrant plugin install vagrant-aws I still get the:

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

Is there another version you guys downgraded to? Also how do you delete the current installation, by just deleting the /Applications/Vagrant directory and the /usr/bin/vagrant binary?

@clarkbk

This comment has been minimized.

Show comment
Hide comment
@clarkbk

clarkbk May 13, 2014

After downgrading to 1.5.4 all my plugin reinstalls were working, except berkshelf. It was giving me that nokogiri error. It ended up working fine when I explicitly declared the plugin version in the install command:

This:

$ vagrant plugin install vagrant-berkshelf --plugin-version '>=2.0.1'

Not this:

$ vagrant plugin install vagrant-berkshelf

Maybe that will help you with vagrant-aws… or maybe not.

clarkbk commented May 13, 2014

After downgrading to 1.5.4 all my plugin reinstalls were working, except berkshelf. It was giving me that nokogiri error. It ended up working fine when I explicitly declared the plugin version in the install command:

This:

$ vagrant plugin install vagrant-berkshelf --plugin-version '>=2.0.1'

Not this:

$ vagrant plugin install vagrant-berkshelf

Maybe that will help you with vagrant-aws… or maybe not.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 13, 2014

Member

I believe this is actually caused by a recent Nokogiri update. Our build servers have recently failed to even build the Vagrant installers anymore because of this issue. I'll attempt to find a workaround.

Member

mitchellh commented May 13, 2014

I believe this is actually caused by a recent Nokogiri update. Our build servers have recently failed to even build the Vagrant installers anymore because of this issue. I'll attempt to find a workaround.

@nodje

This comment has been minimized.

Show comment
Hide comment
@nodje

nodje May 14, 2014

Same problem here on a fresh Debian 7.5 install with Vagrant 1.6.2, trying to install vagrant-lxc

nodje commented May 14, 2014

Same problem here on a fresh Debian 7.5 install with Vagrant 1.6.2, trying to install vagrant-lxc

@yveslaroche

This comment has been minimized.

Show comment
Hide comment
@yveslaroche

yveslaroche May 14, 2014

It works now on my machine with the last Nokogiri update v1.6.2.1.

1.6.2.1 / 2014-05-13

Bug fixes

Fix statically-linked libxml2 installation when using universal builds of Ruby. sparklemotion/nokogiri#1104

Patching mini_portile to address the git dependency detailed in sparklemotion/nokogiri#1102

Library load fix to address segfault reported on some systems. sparklemotion/nokogiri#1097

yveslaroche commented May 14, 2014

It works now on my machine with the last Nokogiri update v1.6.2.1.

1.6.2.1 / 2014-05-13

Bug fixes

Fix statically-linked libxml2 installation when using universal builds of Ruby. sparklemotion/nokogiri#1104

Patching mini_portile to address the git dependency detailed in sparklemotion/nokogiri#1102

Library load fix to address segfault reported on some systems. sparklemotion/nokogiri#1097

@ncloward

This comment has been minimized.

Show comment
Hide comment
@ncloward

ncloward commented May 14, 2014

👍

@emyl emyl referenced this issue May 14, 2014

Closed

Installation #10

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 14, 2014

Member

Fixed for me too. I think this was a Nokogiri bug.

Member

mitchellh commented May 14, 2014

Fixed for me too. I think this was a Nokogiri bug.

@mitchellh mitchellh closed this May 14, 2014

@clarkbk

This comment has been minimized.

Show comment
Hide comment
@clarkbk

clarkbk May 14, 2014

Another 👍

clarkbk commented May 14, 2014

Another 👍

@tmatilai

This comment has been minimized.

Show comment
Hide comment
@tmatilai

tmatilai May 14, 2014

Collaborator

I find it a bit suboptimal that nokogiri (or other core dependencies) gets upgraded even if the plugin doesn't have any dependency on it. But maybe there's no easy and safe way around it with Bundler?

Collaborator

tmatilai commented May 14, 2014

I find it a bit suboptimal that nokogiri (or other core dependencies) gets upgraded even if the plugin doesn't have any dependency on it. But maybe there's no easy and safe way around it with Bundler?

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 14, 2014

Member

@tmatilai Yeah I agree, not at the moment. I've been thinking of some optimizatoins around Bundler but I don't think what I'm thinking would fix this issue.

Member

mitchellh commented May 14, 2014

@tmatilai Yeah I agree, not at the moment. I've been thinking of some optimizatoins around Bundler but I don't think what I'm thinking would fix this issue.

@geauxvirtual

This comment has been minimized.

Show comment
Hide comment
@geauxvirtual

geauxvirtual May 14, 2014

I've just upgraded to Vagrant 1.6.2 and ran into the same issue with nokogiri 1.6.2.1. I am able to manually install nokogiri 1.6.2.1 successfully on my OS X laptop, but vagrant fails with

Updating installed plugins...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.

Will check to see if any of the workarounds work.

geauxvirtual commented May 14, 2014

I've just upgraded to Vagrant 1.6.2 and ran into the same issue with nokogiri 1.6.2.1. I am able to manually install nokogiri 1.6.2.1 successfully on my OS X laptop, but vagrant fails with

Updating installed plugins...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.

Will check to see if any of the workarounds work.

@jonbuffington

This comment has been minimized.

Show comment
Hide comment
@jonbuffington

jonbuffington May 14, 2014

@geauxvirtual I have the same issue on a system where the command line tools are not installed. I do have Xcode 5.1.1 installed.

$ vagrant plugin update vagrant-vmware-fusion
Updating plugins: vagrant-vmware-fusion. This may take a few minutes...
Building nokogiri using packaged libraries.
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.

jonbuffington commented May 14, 2014

@geauxvirtual I have the same issue on a system where the command line tools are not installed. I do have Xcode 5.1.1 installed.

$ vagrant plugin update vagrant-vmware-fusion
Updating plugins: vagrant-vmware-fusion. This may take a few minutes...
Building nokogiri using packaged libraries.
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.
@nodje

This comment has been minimized.

Show comment
Hide comment
@nodje

nodje May 15, 2014

Unfortunately, the problem still appear on a fresh Debian 7.5 fresh install and on an Ubuntu 14.04 fresh install as well:

$ vagrant plugin install vagrant-lxc --plugin-version 1.0.0.alpha.2
Installing the 'vagrant-lxc --version '1.0.0.alpha.2'' plugin. This can take a few minutes...
Building nokogiri using packaged libraries.
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.

nodje commented May 15, 2014

Unfortunately, the problem still appear on a fresh Debian 7.5 fresh install and on an Ubuntu 14.04 fresh install as well:

$ vagrant plugin install vagrant-lxc --plugin-version 1.0.0.alpha.2
Installing the 'vagrant-lxc --version '1.0.0.alpha.2'' plugin. This can take a few minutes...
Building nokogiri using packaged libraries.
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.2.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.
@fredngo

This comment has been minimized.

Show comment
Hide comment
@fredngo

fredngo May 15, 2014

The quick fix from arosenhagen worked for me on OSX 10.8.5

Quick fix: add s.add_dependency(%q, ["< 1.6.2"]) to ~/Applications/Vagrant/embedded/gems/specifications/vagrant-1.6.2.gemspec

fredngo commented May 15, 2014

The quick fix from arosenhagen worked for me on OSX 10.8.5

Quick fix: add s.add_dependency(%q, ["< 1.6.2"]) to ~/Applications/Vagrant/embedded/gems/specifications/vagrant-1.6.2.gemspec

@morrizon

This comment has been minimized.

Show comment
Hide comment
@morrizon

morrizon May 17, 2014

Contributor

@nodje I had the same issue with a fresh installed ubuntu server 12.04. I also had installed libxml2 and libxslt as say in http://nokogiri.org/tutorials/installing_nokogiri.html

sudo apt-get install libxslt-dev libxml2-dev

When I checked the gem install command I got:

sudo /opt/vagrant/embedded/bin/gem install nokogiri -v '1.6.2.1'
...
libiconv is missing. please visit…
...

Also tried give all lib paths:

sudo /opt/vagrant/embedded/bin/gem install nokogiri -v '1.6.2.1' -- --with-xml2-lib=/usr/lib/x86_64-linux-gnu --with-xml2-include=/usr/include/libxml2 --with-xslt-lib=/usr/lib/x86_64-linux-gnu --with-xslt-include=/usr/include/libexslt --with-iconv-lib=/opt/vagrant/embedded/lib --with-iconv-include=/opt/vagrant/embedded/include
...
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
...
Gem files will remain installed in /opt/vagrant/embedded/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /opt/vagrant/embedded/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.2.1/ext/nokogiri/gem_make.out

Last error gave me the answer. I needed the build tools (gcc, libc-dev, ...). I think the libiconv is integrated in libc. I installed build tools and the problem was gone.

sudo apt-get install build-essential

Now the plugins install process work like a charm :)

Contributor

morrizon commented May 17, 2014

@nodje I had the same issue with a fresh installed ubuntu server 12.04. I also had installed libxml2 and libxslt as say in http://nokogiri.org/tutorials/installing_nokogiri.html

sudo apt-get install libxslt-dev libxml2-dev

When I checked the gem install command I got:

sudo /opt/vagrant/embedded/bin/gem install nokogiri -v '1.6.2.1'
...
libiconv is missing. please visit…
...

Also tried give all lib paths:

sudo /opt/vagrant/embedded/bin/gem install nokogiri -v '1.6.2.1' -- --with-xml2-lib=/usr/lib/x86_64-linux-gnu --with-xml2-include=/usr/include/libxml2 --with-xslt-lib=/usr/lib/x86_64-linux-gnu --with-xslt-include=/usr/include/libexslt --with-iconv-lib=/opt/vagrant/embedded/lib --with-iconv-include=/opt/vagrant/embedded/include
...
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
...
Gem files will remain installed in /opt/vagrant/embedded/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /opt/vagrant/embedded/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.2.1/ext/nokogiri/gem_make.out

Last error gave me the answer. I needed the build tools (gcc, libc-dev, ...). I think the libiconv is integrated in libc. I installed build tools and the problem was gone.

sudo apt-get install build-essential

Now the plugins install process work like a charm :)

@nodje

This comment has been minimized.

Show comment
Hide comment
@nodje

nodje May 19, 2014

thanks @morrizon, works like a charm now!

apt-get install libxslt-dev libxml2-dev build-essential

It was my first time installing on fresh servers I guess, so I didn't realise some dependencies like these could be needed.

I'd be good to add this somewhere in the README

nodje commented May 19, 2014

thanks @morrizon, works like a charm now!

apt-get install libxslt-dev libxml2-dev build-essential

It was my first time installing on fresh servers I guess, so I didn't realise some dependencies like these could be needed.

I'd be good to add this somewhere in the README

@7stud

This comment has been minimized.

Show comment
Hide comment
@7stud

7stud Jan 22, 2015

josegonzalez said,
as an aside, people should maybe not use xml and start using json ;)

~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.

Here are the steps leading up to that error:

~/vagrant_getting_started$ vagrant --version
Vagrant 1.7.2

~/vagrant_getting_started$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Setting the name of the VM: vagrant_getting_started_default_1421891952937_26048
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Mounting shared folders...
    default: /vagrant => /Users/7stud/vagrant_getting_started

In an effort to solve the Guest Additions problem:

~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /opt/vagrant/embedded/bin/ruby extconf.rb 
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_copy': Bad file descriptor (Errno::EBADF)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `<module:Logging>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:289:in `<module:MakeMakefile>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:47:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /Users/7stud/.vagrant.d/gems/gems/json-1.8.2 for inspection.
Results logged to /Users/7stud/.vagrant.d/gems/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
~/vagrant_getting_started$ gem install json -v '1.8.2'
Fetching: json-1.8.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.8.2
1 gem installed
~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /opt/vagrant/embedded/bin/ruby extconf.rb 
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_copy': Bad file descriptor (Errno::EBADF)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `<module:Logging>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:289:in `<module:MakeMakefile>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:47:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /Users/7stud/.vagrant.d/gems/gems/json-1.8.2 for inspection.
Results logged to /Users/7stud/.vagrant.d/gems/gems/json-1.8.2/ext/json/ext/generator/gem_make.out

7stud commented Jan 22, 2015

josegonzalez said,
as an aside, people should maybe not use xml and start using json ;)

~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.

Here are the steps leading up to that error:

~/vagrant_getting_started$ vagrant --version
Vagrant 1.7.2

~/vagrant_getting_started$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise32' is up to date...
==> default: Setting the name of the VM: vagrant_getting_started_default_1421891952937_26048
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Mounting shared folders...
    default: /vagrant => /Users/7stud/vagrant_getting_started

In an effort to solve the Guest Additions problem:

~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /opt/vagrant/embedded/bin/ruby extconf.rb 
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_copy': Bad file descriptor (Errno::EBADF)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `<module:Logging>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:289:in `<module:MakeMakefile>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:47:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /Users/7stud/.vagrant.d/gems/gems/json-1.8.2 for inspection.
Results logged to /Users/7stud/.vagrant.d/gems/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
~/vagrant_getting_started$ gem install json -v '1.8.2'
Fetching: json-1.8.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.8.2
1 gem installed
~/vagrant_getting_started$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' 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 json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /opt/vagrant/embedded/bin/ruby extconf.rb 
/opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_copy': Bad file descriptor (Errno::EBADF)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `initialize_dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `dup'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in `<module:Logging>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:289:in `<module:MakeMakefile>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:47:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from extconf.rb:1:in `<main>'


Gem files will remain installed in /Users/7stud/.vagrant.d/gems/gems/json-1.8.2 for inspection.
Results logged to /Users/7stud/.vagrant.d/gems/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
@benjohnson77

This comment has been minimized.

Show comment
Hide comment
@benjohnson77

benjohnson77 Jan 22, 2015

I came into this issue yesterday, a bit late to the party. For me updating vagrant to 1.7.2 solved the issue.

benjohnson77 commented Jan 22, 2015

I came into this issue yesterday, a bit late to the party. For me updating vagrant to 1.7.2 solved the issue.

@obfuscurity

This comment has been minimized.

Show comment
Hide comment
@obfuscurity

obfuscurity Feb 1, 2015

Same. Weird how boxes suddenly stopped working correctly under 1.6.3 for no apparent reason, but upgrading to 1.7.2 fixed it for me.

obfuscurity commented Feb 1, 2015

Same. Weird how boxes suddenly stopped working correctly under 1.6.3 for no apparent reason, but upgrading to 1.7.2 fixed it for me.

jfryman added a commit to StackStorm/st2workroom that referenced this issue Feb 2, 2015

Add Vagrant version requirement
Avoids problems with `nokogiri` install as experienced by @enykeev - hashicorp/vagrant#3769
@tomav

This comment has been minimized.

Show comment
Hide comment
@tomav

tomav Mar 3, 2015

Same here, upgrading to 1.7.2 fixed the problem. Thank you @benjohnson77 & @obfuscurity

tomav commented Mar 3, 2015

Same here, upgrading to 1.7.2 fixed the problem. Thank you @benjohnson77 & @obfuscurity

@arnlaugsson

This comment has been minimized.

Show comment
Hide comment
@arnlaugsson

arnlaugsson Mar 18, 2015

Updating to Vagrant 1.7.2 fixed it for me too.

~  ᐅ vagrant version
Installed Version: 1.7.2
Latest Version: 1.7.2

You're running an up-to-date version of Vagrant!
~  ᐅ vagrant plugin install vagrant-cachier
Installing the 'vagrant-cachier' plugin. This can take a few minutes...
Installed the plugin 'vagrant-cachier (1.2.0)'!

arnlaugsson commented Mar 18, 2015

Updating to Vagrant 1.7.2 fixed it for me too.

~  ᐅ vagrant version
Installed Version: 1.7.2
Latest Version: 1.7.2

You're running an up-to-date version of Vagrant!
~  ᐅ vagrant plugin install vagrant-cachier
Installing the 'vagrant-cachier' plugin. This can take a few minutes...
Installed the plugin 'vagrant-cachier (1.2.0)'!
@hadifarnoud

This comment has been minimized.

Show comment
Hide comment
@hadifarnoud

hadifarnoud Apr 25, 2015

i still have this issue with vagrant 1.6.3 OSX 10.10.3 gem 2.4.6

I have tried ALL the above solutions. At last I edited nokogiri 1.6.2.1 gemspec in /Vagrant folder and modified the version to s.version = "1.6.6.2"

not sure this is going to mess up some things or not.

hadifarnoud commented Apr 25, 2015

i still have this issue with vagrant 1.6.3 OSX 10.10.3 gem 2.4.6

I have tried ALL the above solutions. At last I edited nokogiri 1.6.2.1 gemspec in /Vagrant folder and modified the version to s.version = "1.6.6.2"

not sure this is going to mess up some things or not.

@fireproofsocks

This comment has been minimized.

Show comment
Hide comment
@fireproofsocks

fireproofsocks Apr 28, 2015

Having this problem with Vagrant 1.6.3 on Mac OS X 10.9.5, updating to Vagrant 1.7.2 fixed it.

fireproofsocks commented Apr 28, 2015

Having this problem with Vagrant 1.6.3 on Mac OS X 10.9.5, updating to Vagrant 1.7.2 fixed it.

@johnleetran

This comment has been minimized.

Show comment
Hide comment
@johnleetran

johnleetran Apr 29, 2015

upgrade to a newer version of vagrant OR

gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.3.1'

if you get another error like before run the same command on that package, for example

gem install --install-dir ~/.vagrant.d/gems dep_selector -v '1.0.3'

johnleetran commented Apr 29, 2015

upgrade to a newer version of vagrant OR

gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.3.1'

if you get another error like before run the same command on that package, for example

gem install --install-dir ~/.vagrant.d/gems dep_selector -v '1.0.3'
@jokeyrhyme

This comment has been minimized.

Show comment
Hide comment
@jokeyrhyme

jokeyrhyme Apr 29, 2015

I've had a great run with Vagrant, but I'm transitioning my projects to Docker now. Docker gets easier and easier to use each day, and it doesn't have any of the Ruby-to-C++ interface problems that Vagrant has. If you are having problems with Vagrant, give Docker a try.

jokeyrhyme commented Apr 29, 2015

I've had a great run with Vagrant, but I'm transitioning my projects to Docker now. Docker gets easier and easier to use each day, and it doesn't have any of the Ruby-to-C++ interface problems that Vagrant has. If you are having problems with Vagrant, give Docker a try.

@afilp

This comment has been minimized.

Show comment
Hide comment
@afilp

afilp May 14, 2015

@jokeyrhyme Is there a "VVV" equivalent in Docker?

afilp commented May 14, 2015

@jokeyrhyme Is there a "VVV" equivalent in Docker?

@jokeyrhyme

This comment has been minimized.

Show comment
Hide comment
@jokeyrhyme

jokeyrhyme commented May 15, 2015

@af7 if you mean http://varyingvagrantvagrants.org/ , then I'm not sure. I did find this (but it seems incomplete): https://github.com/Varying-Vagrant-Vagrants/vvv-docker/tree/lkwdwrd

@johnleetran

This comment has been minimized.

Show comment
Hide comment
@johnleetran

johnleetran May 16, 2015

i still prefer vagrant because vagrant boxes are easier to destroy than docker containers/images. i am tired of doing a

docker rmi -f $(docker images -q)
docker rm -f $(docker ps -aq)

Boot2docker, pushing to a privately hosted docker repository is a pain in the butt.

Another pain point, docker caching for building new docker images is a subtle trap. We've been bitten by this several times in development.

johnleetran commented May 16, 2015

i still prefer vagrant because vagrant boxes are easier to destroy than docker containers/images. i am tired of doing a

docker rmi -f $(docker images -q)
docker rm -f $(docker ps -aq)

Boot2docker, pushing to a privately hosted docker repository is a pain in the butt.

Another pain point, docker caching for building new docker images is a subtle trap. We've been bitten by this several times in development.

@theninthnode

This comment has been minimized.

Show comment
Hide comment
@theninthnode

theninthnode May 25, 2015

Solution for me with Vagrant 1.6.3 on Mac was adding this to vagrant-1.6.3.gemspec like suggested above:

s.add_dependency(%q, ["< 1.6.3"])

theninthnode commented May 25, 2015

Solution for me with Vagrant 1.6.3 on Mac was adding this to vagrant-1.6.3.gemspec like suggested above:

s.add_dependency(%q, ["< 1.6.3"])

lukewertz added a commit to palantirnet/drupal-skeleton that referenced this issue Jun 23, 2015

Update Vagrant version dependency.
A number of folks running older versions of vagrant experienced issues
getting nokogiri installed due to a bug that was fixed in vagrant
version 1.7.2: hashicorp/vagrant#3769

We shouldn't support older versions of Vagrant due to these issues.
@ryancastle

This comment has been minimized.

Show comment
Hide comment
@ryancastle

ryancastle Oct 8, 2015

I just had this error on vagrant 1.6.3 for nokogiri 1.6.6.2 when installing vagrant-cachier. But installing that version of nokogiri into ~/.vagrant.d/gems as per @johnleetran's suggestion solved it.

ryancastle commented Oct 8, 2015

I just had this error on vagrant 1.6.3 for nokogiri 1.6.6.2 when installing vagrant-cachier. But installing that version of nokogiri into ~/.vagrant.d/gems as per @johnleetran's suggestion solved it.

@damienalexandre

This comment has been minimized.

Show comment
Hide comment
@damienalexandre

damienalexandre Jan 12, 2016

On Ubuntu 15.10, I just had to install zlib1g-dev:

$ sudo apt install zlib1g-dev
$ vagrant plugin install vagrant-cachier
    Installing the 'vagrant-cachier' plugin. This can take a few minutes...
    Installed the plugin 'vagrant-cachier (1.2.1)'!

This is cleaner than installing an old version of nokogiri manually 😉

damienalexandre commented Jan 12, 2016

On Ubuntu 15.10, I just had to install zlib1g-dev:

$ sudo apt install zlib1g-dev
$ vagrant plugin install vagrant-cachier
    Installing the 'vagrant-cachier' plugin. This can take a few minutes...
    Installed the plugin 'vagrant-cachier (1.2.1)'!

This is cleaner than installing an old version of nokogiri manually 😉

@Tyrael

This comment has been minimized.

Show comment
Hide comment
@Tyrael

Tyrael Jan 12, 2016

not everybody was having problem of building nokogiri because of the missing zlib1g-dev package ;)

Tyrael commented Jan 12, 2016

not everybody was having problem of building nokogiri because of the missing zlib1g-dev package ;)

@Donal-Flanagan

This comment has been minimized.

Show comment
Hide comment
@Donal-Flanagan

Donal-Flanagan Mar 7, 2016

I had the exact same issue on ubuntu 15.10, with vagrant 1.7.4. Installing the zlib1g-dev package worked perfectly. Thanks for the fix @damienalexandre

Donal-Flanagan commented Mar 7, 2016

I had the exact same issue on ubuntu 15.10, with vagrant 1.7.4. Installing the zlib1g-dev package worked perfectly. Thanks for the fix @damienalexandre

@tartley

This comment has been minimized.

Show comment
Hide comment
@tartley

tartley Mar 21, 2016

I also had the exact same issue on Ubuntu 15.10, with vagrant 1.7.4+dfsg-1_all (Ubuntu apt-get default version), but unlike @Donal-Flanagan, installing zlib1g-dev did not fix it for me. I then did a gem install nokogiri -v '1.6.7.2' (following the instructions in the error message Make sure that "gem install nokogiri -v '1.6.7.2'" succeeds...) and it did succeed, and after that, my vagrant plugin install... started working.

tartley commented Mar 21, 2016

I also had the exact same issue on Ubuntu 15.10, with vagrant 1.7.4+dfsg-1_all (Ubuntu apt-get default version), but unlike @Donal-Flanagan, installing zlib1g-dev did not fix it for me. I then did a gem install nokogiri -v '1.6.7.2' (following the instructions in the error message Make sure that "gem install nokogiri -v '1.6.7.2'" succeeds...) and it did succeed, and after that, my vagrant plugin install... started working.

@Mathyn

This comment has been minimized.

Show comment
Hide comment
@Mathyn

Mathyn Apr 13, 2016

I had this issue today when trying to install the vagrant-triggers plugin with Ubuntu 14.04. When I tried to manually run gem install nokogiri -v '1.6.7.2' as suggested by the error output this also failed to install but did provide the helpful error message zlib is missing; necessary for building libxml2.

After installing zlib (sudo apt-get install zlib1g-dev) I could install nokogiri and with that install vagrant-triggers.

Mathyn commented Apr 13, 2016

I had this issue today when trying to install the vagrant-triggers plugin with Ubuntu 14.04. When I tried to manually run gem install nokogiri -v '1.6.7.2' as suggested by the error output this also failed to install but did provide the helpful error message zlib is missing; necessary for building libxml2.

After installing zlib (sudo apt-get install zlib1g-dev) I could install nokogiri and with that install vagrant-triggers.

@avishnyakov

This comment has been minimized.

Show comment
Hide comment
@avishnyakov

avishnyakov May 30, 2016

Getting this while using vagrant-azure (https://github.com/Azure/vagrant-azure) on win10. Not sure what the resolution might be yet.

avishnyakov commented May 30, 2016

Getting this while using vagrant-azure (https://github.com/Azure/vagrant-azure) on win10. Not sure what the resolution might be yet.

@gnufred

This comment has been minimized.

Show comment
Hide comment
@gnufred

gnufred Jun 14, 2016

I had the same problem on Ubuntu 16.04. Installing the latest version of Vagrant from their website fixed it for me.

gnufred commented Jun 14, 2016

I had the same problem on Ubuntu 16.04. Installing the latest version of Vagrant from their website fixed it for me.

@bhouston

This comment has been minimized.

Show comment
Hide comment
@bhouston

bhouston Jul 14, 2016

@Mathyn thanks for the suggestion:

After installing zlib (sudo apt-get install zlib1g-dev) I could install nokogiri and with that install vagrant-triggers.

On a fresh install of Ubuntu 16.04, running sudo apt-get install zlib1g-dev got lxc running for me. Sweet.

bhouston commented Jul 14, 2016

@Mathyn thanks for the suggestion:

After installing zlib (sudo apt-get install zlib1g-dev) I could install nokogiri and with that install vagrant-triggers.

On a fresh install of Ubuntu 16.04, running sudo apt-get install zlib1g-dev got lxc running for me. Sweet.

@andela-mallan

This comment has been minimized.

Show comment
Hide comment
@andela-mallan

andela-mallan Aug 30, 2017

Quick fix!
I run VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-<name_of_plugin> and worked for me as a temporary solution.
Let me know if it helps.

andela-mallan commented Aug 30, 2017

Quick fix!
I run VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-<name_of_plugin> and worked for me as a temporary solution.
Let me know if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment