Unable to install NOKOGIRI 1.6.1 on Ubuntu 13.10 system.

416 views
Skip to first unread message

Gerald Brown

unread,
Apr 5, 2014, 8:35:02 AM4/5/14
to nokogi...@googlegroups.com
Hello,

I have been trying to install NOKOGIRI 1.6.1 on my Ubuntu 13.10 system for several weeks now.

Tonight I think I figured out what the problem is.  I'm running Ruby 2.1.1 and nokogiri has NOT been upgraded yet to that version of Ruby.

The following is the error messages that I keep getting: "libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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 then it lists a bunch of possible configuration options.

I have tried to install the missing libxslt file and get error messages saying: "E: Unable to locate package libxslt"

I have read some posts here that say they are able to install v 1.6.0 but when I tried to install that it could NOT be found.

Any ideas when NOKOGIRI will be upgraded to Ruby 2.1.1???

Thanks,

Gerald

Hassan Schroeder

unread,
Apr 5, 2014, 3:20:53 PM4/5/14
to nokogi...@googlegroups.com
On Sat, Apr 5, 2014 at 5:35 AM, Gerald Brown <gerbr...@gmail.com> wrote:

> I have been trying to install NOKOGIRI 1.6.1 on my Ubuntu 13.10 system for
> several weeks now.
>
> Tonight I think I figured out what the problem is. I'm running Ruby 2.1.1
> and nokogiri has NOT been upgraded yet to that version of Ruby.

I don't have an Ubuntu system running 13.10, but Nokogiri 1.6.1
installs fine with ruby 2.1.1p76 on my Mac (OS 10.9.2).

You need to resolve the problem(s) from the error log. Perhaps you
can gist the entire log and someone using Ubuntu can help...

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Gerald Brown

unread,
Apr 6, 2014, 6:36:31 AM4/6/14
to nokogi...@googlegroups.com
Per your suggestion I ran it again and the following is what is in the error files:

In file mkmf.log the following errors were found:

"conftest.c: In function ‘t’:
conftest.c:13:57: error: ‘xmlParseDoc’ undeclared (first use in this function)

conftest.c: In function ‘t’:
conftest.c:13:57: error: ‘xsltParseStylesheetDoc’ undeclared (first use in this function)

/usr/local/lib/libxslt.so: undefined reference to `xmlBufUse@LIBXML2_2.9.0'
/usr/local/lib/libxslt.so: undefined reference to `xmlBufContent@LIBXML2_2.9.0'
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10:
11:   return 0;
12: }
13: int t(void) { xsltParseStylesheetDoc(); return 0; }
/* end */

In the file gem_make.out the following error was found:

checking for xsltParseStylesheetDoc() in -lxslt... no
-----

libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

-----
*** 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.

extconf failed, exit code 1"

Could the problem be that I'm using Ubuntu on a PC and not using a Mac???

Also on the nokogiri web site it says that it requires Ruby 1.8 or 1.9.  That part of the web site may be outdated as are other portions of it.

Gerald

Gerald Brown

unread,
Apr 6, 2014, 6:58:18 AM4/6/14
to nokogi...@googlegroups.com
Additional information from the nokogiri-1.6.1 README.rdoc:

"From the nokogiri-1.6.1 README.rdoc file:

== REQUIREMENTS:

* ruby 1.8 or 1.9
* libxml2
* libxml2-dev
* libxslt
* libxslt-dev

The following are command that I entered in the terminal.

sudo apt-get install libxml2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libxml2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
gerald@gerald:~$ sudo apt-get install libxml2-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libxml2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
gerald@gerald:~$ sudo apt-get install libxslt
Reading package lists... Done
Building dependency tree      
Reading state information... Done

E: Unable to locate package libxslt
gerald@gerald:~$ sudo apt-get install libxslt-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
libxslt1-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."

Hassan Schroeder

unread,
Apr 6, 2014, 1:50:02 PM4/6/14
to nokogi...@googlegroups.com
On Sun, Apr 6, 2014 at 3:36 AM, Gerald Brown <gerbr...@gmail.com> wrote:

> Could the problem be that I'm using Ubuntu on a PC and not using a Mac???

Many, many people have nokogiri running on Ubuntu. And I just
now installed nokogiri 1.6.1 on an Ubuntu 12.04.4 LTS system with
Rubinius 2.2.6 (Ruby 2.1.0) without a problem.

Maybe you could spin up a 12.04 system and try it there? I have
no experience with 13.10. At least that would add a datapoint...

> Also on the nokogiri web site it says that it requires Ruby 1.8 or 1.9.
> That part of the web site may be outdated as are other portions of it.

Yes, that's definitely outdated.
Reply all
Reply to author
Forward
0 new messages