Skip to content
This repository

Installation failure #109

Closed
jperry opened this Issue · 10 comments

8 participants

Jay Perry Michael D. Ivey Jan Mara Alexander Merkulov Matt Kantor Nethken Sean Carolan Seth Vargo
Jay Perry

Hi,

I'm getting this compile error. I'm using vagrant 1.3.2 on centos 5.9. It's not obvious what is missing. Any ideas what I'm missing?

Thanks,
Jay

/opt/vagrant/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-redhat-linux/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-redhat-linux/ports/libxml2/2.8.0/compile.log' to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/opt/vagrant/embedded/bin/ruby
/home/build/.vagrant.d/gems/gems/mini_portile-0.5.1/lib/mini_portile.rb:251:in `block in execute': Failed to complete compile task (RuntimeError)
        from /home/build/.vagrant.d/gems/gems/mini_portile-0.5.1/lib/mini_portile.rb:243:in `chdir'
        from /home/build/.vagrant.d/gems/gems/mini_portile-0.5.1/lib/mini_portile.rb:243:in `execute'
        from /home/build/.vagrant.d/gems/gems/mini_portile-0.5.1/lib/mini_portile.rb:61:in `compile'
        from /home/build/.vagrant.d/gems/gems/mini_portile-0.5.1/lib/mini_portile.rb:101:in `cook'
        from extconf.rb:101:in `block in <main>'
        from extconf.rb:119:in `call'
        from extconf.rb:119:in `block in <main>'
        from extconf.rb:109:in `tap'
        from extconf.rb:109:in `<main>'
Jay Perry

Looks like I had to do this in order for it to install:

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-berkshelf
Michael D. Ivey
Owner

Interesting. Could you tell which dependency it was missing?

  * (MRI) Source code for libxml 2.8.0 and libxslt 1.2.26 is packaged
    with the gem. These libraries are compiled at gem install time
    unless the environment variable NOKOGIRI_USE_SYSTEM_LIBRARIES is
    set. VERSION_INFO (also `nokogiri -v`) exposes whether libxml was
    compiled from packaged source, or the system library was used.
Jay Perry

I did install libxml2-devel before trying the environment variable.

Jan Mara

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 worked for me too on Ubuntu 12.04 LTS

Alexander Merkulov

Same here but no luck. OSX 10.9.
gem nio4r fail.

Matt Kantor

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 worked for me on OS X 10.8 and Vagrant 1.4.2.


My error log was a bit different; I'll paste it below for future Googlers:

$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
/Applications/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/builder.rb:62:in `run': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

    /Applications/Vagrant/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/mkantor/.vagrant.d/gems/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... ERROR, review 'tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26/compile.log' to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
[...]

And

$ tail /Users/mkantor/.vagrant.d/gems/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.26/compile.log
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/mkantor/.vagrant.d/gems/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0/include/libxml2 -I/Applications/Vagrant/bin/../embedded/include -g -O2 -Wall -MT security.lo -MD -MP -MF .deps/security.Tpo -c security.c  -fno-common -DPIC -o .libs/security.o
mv -f .deps/security.Tpo .deps/security.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall   -version-info 2:26:1 -L/Applications/Vagrant/bin/../embedded/lib -o libxslt.la -rpath /Users/mkantor/.vagrant.d/gems/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.26/lib attrvt.lo xslt.lo xsltlocale.lo xsltutils.lo pattern.lo templates.lo variables.lo keys.lo numbers.lo extensions.lo extra.lo functions.lo namespaces.lo imports.lo attributes.lo documents.lo preproc.lo transform.lo security.lo -L/Users/mkantor/.vagrant.d/gems/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0/lib -lxml2 -lz -lpthread -liconv -lm  
libtool: link: warning: library `/Applications/Vagrant/bin/../embedded/lib/libxml2.la' was moved.
grep: /vagrant-installer/staging/embedded/lib/libiconv.la: No such file or directory
sed: /vagrant-installer/staging/embedded/lib/libiconv.la: No such file or directory
libtool: link: `/vagrant-installer/staging/embedded/lib/libiconv.la' is not a valid libtool archive
make[2]: *** [libxslt.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Nethken

I had the same error as mkantor on OS X 10.8 and Vagrant 1.4.3. This really seems to point to a bug either in the install for this plugin or for the nokogiri gem.

Sean Carolan

Same problem here. OSX 10.9 and Vagrant 1.4.3. Berkshelf plugin is completely broken. ;-(

Is there anything I can do to help troubleshoot/fix this issue?

Seth Vargo
Owner

We just released a new version of vagrant-berkshelf which fixes this issue.

Sean Carolan

No worries, it was a good motivation to finally learn test kitchen and docker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.