Nokogirl on ubuntu: failed to build gem native extension


#1

Hi,

I want to give a try to nokogiri with mechanize as it seems to have
encoding methods.

I run ubuntu heron and installed the libraries libxslt1-dev libxml2
libxml2-dev.

now when i run sudo gem install nokogiri i get this error log:

ruby extconf.rb install nokogiri-1.1.1.gem
extconf.rb:3:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:3

I don’t get what’s missing here?

thanks for comments.


#2

Search and install package named ruby-dev. Notice also that it’s
nokogiri (last letter is ‘i’).


Pozdrawiam

Rados³aw Bu³at
http://radarek.jogger.pl - mój blog


#3

Radosław Bułat wrote:

Search and install package named ruby-dev.
Have similar problem and tried to install ruby-dev but it is not in my
system
I am on linux ( CentOS release 5.2 (Final) How do I go about installing
it?
Notice also that it’s
nokogiri (last letter is ‘i’).


Pozdrawiam

Rados�aw Bu�at
http://radarek.jogger.pl - m�j blog


#4

On May 27, 2009, at 2:52 PM, Alice Gheorghiu wrote:

Radosław Bułat wrote:

Search and install package named ruby-dev.
Have similar problem and tried to install ruby-dev but it is not in my
system
I am on linux ( CentOS release 5.2 (Final) How do I go about
installing
it?
This should get you started:

http://is.gd/HmzB

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University


#5

Charles J. wrote:

On May 27, 2009, at 2:52 PM, Alice Gheorghiu wrote:

Radosław Bułat wrote:

Search and install package named ruby-dev.
Have similar problem and tried to install ruby-dev but it is not in my
system
I am on linux ( CentOS release 5.2 (Final) How do I go about
installing
it?
This should get you started:

http://is.gd/HmzB
Tried it and also followed this site http://whomwah.com/tag/howto/ for
my specific OS to no avail. Maybe I need to modify the conf file (I
attached file with execution for review)
Thanks a bunch for all the help – alice

Cheers–

Charles

Charles J.
Advanced Computing Center for Research and Education
Vanderbilt University


#6

On May 27, 2009, at 12:52, Alice Gheorghiu wrote:

Radosław Bułat wrote:

Search and install package named ruby-dev.
Have similar problem and tried to install ruby-dev but it is not in my
system
I am on linux ( CentOS release 5.2 (Final) How do I go about
installing
it?
Notice also that it’s
nokogiri (last letter is ‘i’).

Sorry, I lost the original, but there is a nokogirl gem:

$ gem list -r nokogir

*** REMOTE GEMS ***

nokogiri (1.2.3)
nokogirl (1.0)
$ gem dep -r nokogirl
Gem nokogirl-1.0
nokogiri (>= 0, runtime)


#7

On May 28, 2009, at 16:12, Alice Gheorghiu wrote:

Notice also that it’s nokogiri (last letter is ‘i’).
Gem nokogirl-1.0
nokogiri (>= 0, runtime)

I tried it too and it’s there. What’s the point? Should we try to
install nokogirl instead?

IIRC, Mike D. always typed “nokogirl” instead of “nokogiri”, so
he released “nokogirl”


#8

Eric H. wrote:

On May 27, 2009, at 12:52, Alice Gheorghiu wrote:

Radosław Bułat wrote:
Search and install package named ruby-dev.
Have similar problem and tried to install ruby-dev but it is not in my
system
I am on linux ( CentOS release 5.2 (Final) How do I go about
installingit?
Notice also that it’s nokogiri (last letter is ‘i’).

Sorry, I lost the original, but there is a nokogirl gem:

$ gem list -r nokogir

*** REMOTE GEMS ***

nokogiri (1.2.3)
nokogirl (1.0)
$ gem dep -r nokogirl
Gem nokogirl-1.0
nokogiri (>= 0, runtime)

I tried it too and it’s there. What’s the point? Should we try to
install nokogirl instead?


#9

Mike D. wrote:

2009/5/28 Eric H. removed_email_address@domain.invalid

nokogiri (>= 0, runtime)

I tried it too and it’s there. What’s the point? Should we try to
install nokogirl instead?
IIRC, Mike D. always typed “nokogirl” instead of “nokogiri”, so he
released “nokogirl”

Since I was a small boy, I have always wanted to be famous for my poor
typing skills. So, I would love to sit back and let this particular
piece of
urban mythology propagate.

However, nokogirl is just too damn funny to not give credit where it is
due:

http://judofyr.net/posts/nokogirl.html

Carry on.

LOL -with tears in my eyes! Worked on a wget today, with the help of my
provider and it’s a nice solution instead of the mechanize module I was
hoping to install from this nokogiri(l) or whatever. I’ll keep trying
for my other data provider and …Stay tuned!. In the meantime if
there’s any ruby expert with a bit of time to review the attachement,
maybe I am missing something.


#10

2009/5/28 Eric H. removed_email_address@domain.invalid

nokogiri (>= 0, runtime)

I tried it too and it’s there. What’s the point? Should we try to
install nokogirl instead?

IIRC, Mike D. always typed “nokogirl” instead of “nokogiri”, so he
released “nokogirl”

Since I was a small boy, I have always wanted to be famous for my poor
typing skills. So, I would love to sit back and let this particular
piece of
urban mythology propagate.

However, nokogirl is just too damn funny to not give credit where it is
due:

http://judofyr.net/posts/nokogirl.html

Carry on.


#11

Alice Gheorghiu wrote:

Mike D. wrote:

2009/5/28 Eric H. removed_email_address@domain.invalid

nokogiri (>= 0, runtime)

I tried it too and it’s there. What’s the point? Should we try to
install nokogirl instead?
IIRC, Mike D. always typed “nokogirl” instead of “nokogiri”, so he
released “nokogirl”

Since I was a small boy, I have always wanted to be famous for my poor
typing skills. So, I would love to sit back and let this particular
piece of
urban mythology propagate.

However, nokogirl is just too damn funny to not give credit where it is
due:

http://judofyr.net/posts/nokogirl.html

Carry on.

LOL -with tears in my eyes! Worked on a wget today, with the help of my
provider and it’s a nice solution instead of the mechanize module I was
hoping to install from this nokogiri(l) or whatever. I’ll keep trying
for my other data provider and …Stay tuned!. In the meantime if
there’s any ruby expert with a bit of time to review the attachement,
maybe I am missing something.

The issue on my installation was that libxml2 appeared in my /usr/lib64
directory as libxml2.so.2, libxml2.so.2.6.26, and libxml2-2.6.26 so the
configuration file could not determine which one to use. By making a
symbolic link to the latest version libsml2.so.2.6.26 resolved the
problem. Both nokogiri and mechanize were successfully installed


#12

Greetings and salutations!

On Sat, Jan 29, 2011 at 6:26 PM, Reza N. removed_email_address@domain.invalid wrote:

Hi Alice

Could you please tell me WHICH config file you changed or how? I’m
porting a tiny app from Windows to Ubunto and nokogiri port is one of
the problems I’ve had so far.

The thread you’ve posted to is over a year and a half old! That’s
ancient.

You may get better responses if you described what your issue is,
attaching
information about your Ubuntu version, libxml2 and libxslt versions, and
the
contents of your mkmf.log file after the failed gem installation.

Hint: you may want to check out
http://nokogiri.org/tutorials/installing_nokogiri.html


#13

Hi Alice

Could you please tell me WHICH config file you changed or how? I’m
porting a tiny app from Windows to Ubunto and nokogiri port is one of
the problems I’ve had so far.

Thnaks