Hello,
I can't find a way to install nokogiri 1.6.6.2 which is part of the CoRM package, an open source CRM (
http://www.corm.fr/) on my Debian Wheezy server.
<pre>
Distributor ID: Debian
Description: Debian GNU/Linux 7.7 (wheezy)
Release: 7.7
Codename: wheezy
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
</pre>
Here's part of the error message:
<pre>
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
Building nokogiri using system libraries.
libxml2 version 2.6.21 or later is required!
*** 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.
</pre>
This is odd because it seems that I have every packages needed for libxml2:
<pre>
dpkg -l|grep libxml
ii libxml-namespacesupport-perl 1.09-3 all Perl module for supporting simple generic namespaces
ii libxml-parser-perl 2.41-1+b1 amd64 Perl module for parsing XML files
ii libxml-sax-base-perl 1.07-1 all base class for SAX drivers and filters
ii libxml-sax-expat-perl 0.40-2 all Perl module for a SAX2 driver for Expat (XML::Parser)
ii libxml-sax-perl 0.99+dfsg-2 all Perl module for using and building Perl SAX2 XML processors
ii libxml2:amd64 2.8.0+dfsg1-7+wheezy4 amd64 GNOME XML library
ii libxml2-dev:amd64 2.8.0+dfsg1-7+wheezy4 amd64 Development files for the GNOME XML library
ii libxml2-utils 2.8.0+dfsg1-7+wheezy2 amd64 XML utilities
ii python-libxml2 2.8.0+dfsg1-7+wheezy2 amd64 Python bindings for the GNOME XML library
ii python-lxml 2.3.2-1+deb7u1 amd64 pythonic binding for the libxml2 and libxslt libraries
ii ruby-libxml 2.3.2-1 amd64 Ruby Bindings for LibXML2
</pre>
Also, I have already installed what's look like an old version of the libnokogiri the and ruby-nokogiri lib installed.
<pre>
dpkg -l |grep nokogiri
ii libnokogiri-ruby1.9.1 1.5.5-1 all Transitional package for ruby-nokogiri
ii ruby-nokogiri 1.5.5-1 amd64 HTML, XML, SAX, and Reader parser for Ruby
</pre>
Here's the output of the mkmf.log:
<pre>
"gcc -o conftest -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm -lc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
"gcc -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC -Werror -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
package configuration for libxml-2.0 is not found
package configuration for libxslt is not found
package configuration for libexslt is not found
"gcc -E -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC -g -DXP_UNIX -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -o conftest.i"
conftest.c:3:31: fatal error: libxml/xmlversion.h: Aucun fichier ou dossier de ce type
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <libxml/xmlversion.h>
4:
5: #if LIBXML_VERSION < 20621
6: #error libxml2 is way too old
7: #endif
/* end */
</pre>
It's like libxml2 is too old when it's newer than the requirement (as far as I can understand).
I'm not sure how to proceed from here.
Btw, I tried the tips provided on this page with no success:
TIA
-Emmanuel