vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

Install issue regarding Mac OS X and nokogiri

Open ProbablyRusty opened this issue 10 years ago • 17 comments

I have successfully installed vagrant-aws on a Mac many times in the past, but now this is failing consistently (10.9.3) on both Vagrant 1.5.4 and Vagrant 1.6.2, on multiple Macs:

$ vagrant -v Vagrant 1.5.4 $ vagrant plugin install vagrant-aws Installing the 'vagrant-aws' 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.

ProbablyRusty avatar May 19 '14 14:05 ProbablyRusty

I also get this error. At first I thought it was related to vagrant 1.6.2, but rolling back to 1.5.4 didn't fix it.

I did NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-aws and that seemed to work for me, but then I tried it on another system and it failed with the same error.

BlinkyStitt avatar May 20 '14 18:05 BlinkyStitt

I can confirm that NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-aws does not work for me. I see the same error regardless.

ProbablyRusty avatar May 22 '14 12:05 ProbablyRusty

I'm getting this same error and the above solution did not work for me either.

kcaulkins avatar May 22 '14 15:05 kcaulkins

Doesn't work for me either on one computer.

On the other (yes, both running Mavericks), I get this error:

Net::HTTPNotFound: No gems found matching "vagrant-login" "1.0.0" nil

:confused:

heptat avatar May 22 '14 16:05 heptat

@heptat , you should retry. I saw that error on one of my systems and it was just because the mirror was having trouble. 15 minutes later for me and that was fixed

BlinkyStitt avatar May 23 '14 01:05 BlinkyStitt

@WyseNynja cheers, did so and yes...back to the original error :joy:

heptat avatar May 23 '14 03:05 heptat

I just did brew unlink gcc and now it works! Now to figure out why gcc got linked in the first place.

BlinkyStitt avatar May 28 '14 01:05 BlinkyStitt

I am able to install the gem but installing the plugin fails: https://gist.github.com/sunilgarg/4cc14aab3706166b7855

[EDIT] resolved this by setting CCACHE_DISABLE=1

sunilgarg avatar May 28 '14 17:05 sunilgarg

This seems to have worked OK with the newly released Vagrant 1.6.3:

$ vagrant -v
Vagrant 1.6.3
$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.4.1)'!
$ 

ProbablyRusty avatar May 29 '14 20:05 ProbablyRusty

Also It seems to work for me with vagrant 1.6.3 as well. But it was broken with vagrant 1.6.2.

So those experiencing this issue should upgrade to vagrant 1.6.3 as soon as possible ~!

jayunit100 avatar Jun 22 '14 13:06 jayunit100

I can confirm this isn't working with vagrant 1.6.3

adkatrit avatar Jul 24 '14 20:07 adkatrit

I was able to get this to work on vagrant 1.6.3 by manually installing nokogiri with gem that comes natively with vagrant: /opt/vagrant/embedded/bin/gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.3.1' (You may need to first install gcc)

I should mention that after I resolved the nokogiri error, I had a similar issue with json:

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

Similarly, installing it manually resolved it.

Hope this workaround helps!

vincenthuynh avatar Jul 30 '14 20:07 vincenthuynh

In my case the nokogiri folders and there files located in ~/vagrant.d/gems/gems had wrong rights (user/group).

After changing them to username:staff (username = your console user name) it works like a charm.

ghost avatar Aug 07 '14 21:08 ghost

I still have 2 systems that have this error and don't have gcc installed by brew (so they are using apple's compiler). All permissions are what I expect. Anyone have other ideas?

BlinkyStitt avatar Aug 08 '14 22:08 BlinkyStitt

I haven't noticed this one in a while. Something must have fixed it.

BlinkyStitt avatar Sep 28 '16 23:09 BlinkyStitt

facing similar issue on OS X 10.12.5 ➜ ~ vagrant -v Vagrant 1.9.5 ➜ vagrant plugin install vagrant-aws

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:

ERROR: Failed to build gem native extension.

/opt/vagrant/embedded/bin/ruby -r ./siteconf20170518-9976-g6h5d2.rb extconf.rb

checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. Using mini_portile version 2.1.0 checking for iconv.h... yes checking for gzdopen() in -lz... yes checking for iconv using --with-opt-* flags... no checking for iconv... no pkg-config could not be used to find libiconv Please install either pkg-config or the pkg-config gem per

gem install pkg-config -v "~> 1.1.7"

checking for iconv using pkg-config libiconv... no

libiconv is missing. Please locate mkmf.log to investigate how it is failing.

*** extconf.rb failed ***

mkmf.txt

hariav avatar May 18 '17 17:05 hariav

I can confirm this isn't working with Vagrant 1.9.6 on macOS Sierra 10.12.5.

See errors at https://gist.github.com/perlporter/b070fceaa19893cc17fd1c96e3a9ba34

perlporter avatar Jul 03 '17 19:07 perlporter