Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Install issue regarding Mac OS X and nokogiri #235

Open
ProbablyRusty opened this issue May 19, 2014 · 17 comments
Open

Install issue regarding Mac OS X and nokogiri #235

ProbablyRusty opened this issue May 19, 2014 · 17 comments

Comments

@ProbablyRusty
Copy link

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.

@BlinkyStitt
Copy link

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.

@ProbablyRusty
Copy link
Author

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.

@kcaulkins
Copy link

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

@heptat
Copy link

heptat commented May 22, 2014

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

😕

@BlinkyStitt
Copy link

@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

@heptat
Copy link

heptat commented May 23, 2014

@wysenynja cheers, did so and yes...back to the original error 😂

@BlinkyStitt
Copy link

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

@sunilgarg
Copy link

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

@ProbablyRusty
Copy link
Author

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)'!
$ 

@jayunit100
Copy link

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 ~!

@adkatrit
Copy link

I can confirm this isn't working with vagrant 1.6.3

@vincenthuynh
Copy link

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!

@ghost
Copy link

ghost commented Aug 7, 2014

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.

@BlinkyStitt
Copy link

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
Copy link

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

@hariav
Copy link

hariav commented May 18, 2017

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

@perlporter
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants