You are not logged in.
Pages: 1
Topic closed
I'm at the point in my RoR install where I'm executing a "bundle install" command. The install fails when it trys to install nokogiri 1.4.4. The error message reads "failed to build gem native extension". Any ideas as to why this gem is failing to install?
Offline
What version of ruby are you using?
ruby -v
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I'm running ruby v1.9.2p180.
Here is the main area of the section of error message I receive after a bundle install command...
Using activerecord (3.0.5)
Using bundler (1.0.10)
Using diff-lcs (1.1.2)
Installing nokogiri (1.4.4) with native extensions /usr/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in 'rescue in block in build_extensions': ERROR: failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby extconf.rb
checking for libxml/parser.h...***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 many need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
Offline
Nokogiri requires libxml2 and libxslt in order to compile. Do you have both installed?
sudo pacman -S libxml2 libxslt
More info here
Offline
Yes I do have both libs installed...
libxml2 v2.7.8-1
libxslt v1.1.26-2
Offline
try
gem install --verbose --no-rdoc --no-ri nokogiri
see if you get any more informative error messages
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
gave me the same error messages as before (listed in previous reply). I think the problem might be that libxml2 and libxslt are not located in a place where nokogiri is looking when being installed therefore I'm getting the error messages. And I'm not sure what config options to pass when doing a "gem install nokogiri".
Offline
The page I linked to has a section near the bottom called "Nonstandard libxml2 / libxslt installations" which shows the config options to use.
Have you checked mkmf.log? It may contain a more specific error message.
Offline
I used the config options listed in your previous link with the same error message results. My mkmf.log does not contain any error messages. I really don't know what to do next...I'll just have to keep on lookin'.
Offline
I had the same problem. It turns out that the Ruby "mkmf" library's pkg_config method (http://rubydoc.info/stdlib/mkmf/MakeMak … nce_method) will just silently say it can't find a library if the "pkg-config" program doesn't exist. It should probably just give an error if pkg-config doesn't exist. I just had to run "pacman -S base-devel", and that fixed the "checking for libxml/parser.h..." error.
Now, my latest ~/.bundler/tmp/*/extensions/x86_64-linux/2.1.0/nokogiri-1.5.9/mkmf.log is showing the following:
"gcc -o conftest -I/usr/include/ruby-2.1.0/x86_64-linux -I/usr/include/ruby-2.1.0/ruby/backward -I/usr/include/ruby-2.1.0 -I. -I/opt/local/include/libxml2 -I/usr/local/include/libxml2 -I/opt/local/include -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC --with-xml2-dir=/usr/include/libxml2 --with-xslt-dir=/usr/include/libxslt -g -DXP_UNIX -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -L. -L/usr/lib -L/opt/local/lib -L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm -ldl -lm -lxml2 -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc "
gcc: error: unrecognized command line option ‘--with-xml2-dir=/usr/include/libxml2’
gcc: error: unrecognized command line option ‘--with-xslt-dir=/usr/include/libxslt’
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
Offline
Hi paulie4,
Welcome to Arch Linux. I cannot tell if you are having a problem, or if you are contributing additional information to the thread. Regardless, this thread is three years old, and much has changed in that time. I am going to go ahead and close this thread. If you are having a problem, please feel free to start a new thread and, if you feel it is appropriate, provide a BBCode link back to this thread as a reference.
Thanks.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed