# Gem + libxml

**URL:** <https://rubytalk.org/t/gem-libxml/25644>\
**Category:** ruby-talk\
**Created:** [10 March 2006 20:45 UTC](https://rubytalk.org/t/gem-libxml/25644 "2006-03-10T20:45:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikael\_Larsson](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Mikael\_Larsson](https://rubytalk.org/u/Mikael_Larsson)\
**Post date:** [10 March 2006 20:45 UTC](https://rubytalk.org/t/gem-libxml/25644/1 "2006-03-10T20:45:16Z")

</div>

Hi

Wat is wrong here ?? Do I need ruby source?

linux:~ #  
linux:~ # ruby -v  
ruby 1.8.2 (2004-12-25) [i586-linux]  
linux:~ # gem -v  
0.8.11  
linux:~ # gem install libxml-ruby  
Attempting local installation of 'libxml-ruby'  
Local gem file not found: libxml-ruby\*.gem  
Attempting remote installation of 'libxml-ruby'  
Building native extensions. This could take a while...  
can't find header files for ruby.  
ERROR: While executing gem ... (RuntimeError)  
&nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6 for inspection.  
&nbsp;&nbsp;ruby extconf.rb install libxml-ruby\n

Results logged to /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
linux:~ # cat /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
ruby extconf.rb install libxml-ruby  
linux:~ #

Thanks

//Mike

---

<div class="post-metadata">

**Author:** ![Ross\_Bamford4](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Ross\_Bamford4](https://rubytalk.org/u/Ross_Bamford4)\
**Post date:** [11 March 2006 08:37 UTC](https://rubytalk.org/t/gem-libxml/25644/2 "2006-03-11T08:37:42Z")

</div>

Hmm, I think that the Ruby headers should always be installed, in your  
case it looks like they should be at:

&nbsp;&nbsp;/usr/lib/ruby/1.8/i586-linux/

Could you verify the presence (or absence) of a bunch of .h files at  
that location? If they're not there, then you should probably grab a new  
Ruby install (is this one a package from your distro?).

> **···**
>
> On Sat, 2006-03-11 at 05:45 +0900, Mikael Larsson wrote:
> 
> > Hi
> > 
> > Wat is wrong here ?? Do I need ruby source?
> > 
> > linux:~ #  
> > linux:~ # ruby -v  
> > ruby 1.8.2 (2004-12-25) [i586-linux]  
> > linux:~ # gem -v  
> > 0.8.11  
> > linux:~ # gem install libxml-ruby  
> > Attempting local installation of 'libxml-ruby'  
> > Local gem file not found: libxml-ruby\*.gem  
> > Attempting remote installation of 'libxml-ruby'  
> > Building native extensions. This could take a while...  
> > can't find header files for ruby.  
> > ERROR: While executing gem ... (RuntimeError)  
> > &nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
> > Gem files will remain installed in  
> > /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6 for inspection.  
> > &nbsp;&nbsp;ruby extconf.rb install libxml-ruby\n
> > 
> > Results logged to  
> > /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
> > linux:~ # cat  
> > /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
> > ruby extconf.rb install libxml-ruby  
> > linux:~ #
> 
> --  
> Ross Bamford - rosco@roscopeco.REMOVE.co.uk

---

<div class="post-metadata">

**Author:** ![Mikael\_Larsson](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Mikael\_Larsson](https://rubytalk.org/u/Mikael_Larsson)\
**Post date:** [11 March 2006 09:22 UTC](https://rubytalk.org/t/gem-libxml/25644/3 "2006-03-11T09:22:24Z")

</div>

Ross Bamford wrote:

> &nbsp;&nbsp;
> 
> > Hi
> > 
> > Wat is wrong here ?? Do I need ruby source?
> > 
> > linux:~ #  
> > linux:~ # ruby -v  
> > ruby 1.8.2 (2004-12-25) [i586-linux]  
> > linux:~ # gem -v  
> > 0.8.11  
> > linux:~ # gem install libxml-ruby  
> > Attempting local installation of 'libxml-ruby'  
> > Local gem file not found: libxml-ruby\*.gem  
> > Attempting remote installation of 'libxml-ruby'  
> > Building native extensions. This could take a while...  
> > can't find header files for ruby.  
> > ERROR: While executing gem ... (RuntimeError)  
> > &nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
> > Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6 for inspection.  
> > &nbsp;&nbsp;ruby extconf.rb install libxml-ruby\n
> > 
> > Results logged to /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
> > linux:~ # cat /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6/ext/xml/gem\_make.out  
> > ruby extconf.rb install libxml-ruby  
> > linux:~ #micke@linux:~/dvl/nexus/nexpre\> ll /usr/lib/ruby/1.8/i586-linux/  
> > total 864  
> > -rwxr-xr-x 1 root root 39492 2006-01-26 15:02 bigdecimal.so  
> > -rwxr-xr-x 1 root root 43408 2006-01-26 15:02 curses.so  
> > -rwxr-xr-x 1 root root 17212 2006-01-26 15:02 dbm.so  
> > drwxr-xr-x 2 root root 152 2006-03-03 09:30 digest  
> > -rwxr-xr-x 1 root root 7236 2006-01-26 15:02 digest.so  
> > -rwxr-xr-x 1 root root 72872 2006-01-26 15:02 dl.so  
> > -rwxr-xr-x 1 root root 6904 2006-01-26 15:02 enumerator.so  
> > -rwxr-xr-x 1 root root 8144 2006-01-26 15:02 etc.so  
> > -rwxr-xr-x 1 root root 4364 2006-01-26 15:02 fcntl.so  
> > -rwxr-xr-x 1 root root 18552 2006-01-26 15:02 gdbm.so  
> > -rwxr-xr-x 1 root root 13036 2006-01-26 15:02 iconv.so  
> > drwxr-xr-x 2 root root 72 2006-03-03 09:30 io  
> > -rwxr-xr-x 1 root root 135712 2006-01-26 15:02 nkf.so  
> > -rwxr-xr-x 1 root root 217928 2006-01-26 15:02 openssl.so  
> > -rwxr-xr-x 1 root root 8960 2006-01-26 15:02 pty.so  
> > drwxr-xr-x 2 root root 80 2006-03-03 09:30 racc  
> > -rw-r--r-- 1 root root 6619 2006-01-26 15:00 rbconfig.rb  
> > -rwxr-xr-x 1 root root 14972 2006-01-26 15:02 readline.so  
> > -rwxr-xr-x 1 root root 22940 2006-01-26 15:02 sdbm.so  
> > -rwxr-xr-x 1 root root 35688 2006-01-26 15:02 socket.so  
> > -rwxr-xr-x 1 root root 16708 2006-01-26 15:02 stringio.so  
> > -rwxr-xr-x 1 root root 15552 2006-01-26 15:02 strscan.so  
> > -rwxr-xr-x 1 root root 89536 2006-01-26 15:02 syck.so  
> > -rwxr-xr-x 1 root root 10560 2006-01-26 15:02 syslog.so  
> > -rwxr-xr-x 1 root root 33008 2006-01-26 15:02 zlib.so
> 
> Hmm, I think that the Ruby headers should always be installed, in your  
> case it looks like they should be at:
> 
> &nbsp;&nbsp;/usr/lib/ruby/1.8/i586-linux/
> 
> Could you verify the presence (or absence) of a bunch of .h files at  
> that location? If they're not there, then you should probably grab a new  
> Ruby install (is this one a package from your distro?).

found this  
micke@linux:~/dvl/nexus/nexpre\> ll /usr/lib/ruby/1.8/i586-linux/  
total 864  
-rwxr-xr-x 1 root root 39492 2006-01-26 15:02 bigdecimal.so  
-rwxr-xr-x 1 root root 43408 2006-01-26 15:02 curses.so  
-rwxr-xr-x 1 root root 17212 2006-01-26 15:02 dbm.so  
drwxr-xr-x 2 root root 152 2006-03-03 09:30 digest  
-rwxr-xr-x 1 root root 7236 2006-01-26 15:02 digest.so  
-rwxr-xr-x 1 root root 72872 2006-01-26 15:02 dl.so  
-rwxr-xr-x 1 root root 6904 2006-01-26 15:02 enumerator.so  
-rwxr-xr-x 1 root root 8144 2006-01-26 15:02 etc.so  
-rwxr-xr-x 1 root root 4364 2006-01-26 15:02 fcntl.so  
-rwxr-xr-x 1 root root 18552 2006-01-26 15:02 gdbm.so  
-rwxr-xr-x 1 root root 13036 2006-01-26 15:02 iconv.so  
drwxr-xr-x 2 root root 72 2006-03-03 09:30 io  
-rwxr-xr-x 1 root root 135712 2006-01-26 15:02 nkf.so  
-rwxr-xr-x 1 root root 217928 2006-01-26 15:02 openssl.so  
-rwxr-xr-x 1 root root 8960 2006-01-26 15:02 pty.so  
drwxr-xr-x 2 root root 80 2006-03-03 09:30 racc  
-rw-r--r-- 1 root root 6619 2006-01-26 15:00 rbconfig.rb  
-rwxr-xr-x 1 root root 14972 2006-01-26 15:02 readline.so  
-rwxr-xr-x 1 root root 22940 2006-01-26 15:02 sdbm.so  
-rwxr-xr-x 1 root root 35688 2006-01-26 15:02 socket.so  
-rwxr-xr-x 1 root root 16708 2006-01-26 15:02 stringio.so  
-rwxr-xr-x 1 root root 15552 2006-01-26 15:02 strscan.so  
-rwxr-xr-x 1 root root 89536 2006-01-26 15:02 syck.so  
-rwxr-xr-x 1 root root 10560 2006-01-26 15:02 syslog.so  
-rwxr-xr-x 1 root root 33008 2006-01-26 15:02 zlib.so

Ruby comes with distro ( SUSE 10)

//Mike

> **···**
>
> > On Sat, 2006-03-11 at 05:45 +0900, Mikael Larsson wrote:

---

<div class="post-metadata">

**Author:** ![Ross\_Bamford4](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Ross\_Bamford4](https://rubytalk.org/u/Ross_Bamford4)\
**Post date:** [11 March 2006 09:35 UTC](https://rubytalk.org/t/gem-libxml/25644/4 "2006-03-11T09:35:14Z")

</div>

Okay, it seems you're missing the headers. Couple of things you might  
try:

&nbsp;&nbsp;+ Does Suse have a ruby-devel package ? If so, get that.

&nbsp;&nbsp;+ Beg/borrow/steal the appropriate headers, and copy them to  
&nbsp;&nbsp;&nbsp;&nbsp;that directory (maybe not a good idea).

&nbsp;&nbsp;+ Alternatively, grab a copy of the source and build it  
&nbsp;&nbsp;&nbsp;&nbsp;yourself. You could upgrade to 1.8.4 at the same time 😉

> **···**
>
> On Sat, 2006-03-11 at 18:22 +0900, Mikael Larsson wrote:
> 
> > Ross Bamford wrote:  
> > \> On Sat, 2006-03-11 at 05:45 +0900, Mikael Larsson wrote:  
> > \>  
> > \>\> Hi  
> > \>\>  
> > \>\> Wat is wrong here ?? Do I need ruby source?  
> > \>\>  
> > \>\> linux:~ #  
> > \>\> linux:~ # ruby -v  
> > \>\> ruby 1.8.2 (2004-12-25) [i586-linux]  
> > \>\> linux:~ # gem -v  
> > \>\> 0.8.11  
> > \>\> linux:~ # gem install libxml-ruby  
> > \>\> Attempting local installation of 'libxml-ruby'  
> > \>\> Local gem file not found: libxml-ruby\*.gem  
> > \>\> Attempting remote installation of 'libxml-ruby'  
> > \>\> Building native extensions. This could take a while...  
> > \>\> can't find header files for ruby.  
> > \>\> ERROR: While executing gem ... (RuntimeError)  
> > \>\> ERROR: Failed to build gem native extension.  
> > \>\> Gem files will remain installed in  
> > \>\> /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6 for inspection.  
> > \>\> ruby extconf.rb install libxml-ruby\n  
> > \>\>  
> > \>  
> > \> Hmm, I think that the Ruby headers should always be installed, in your  
> > \> case it looks like they should be at:  
> > \>  
> > \> /usr/lib/ruby/1.8/i586-linux/  
> > \>  
> > \> Could you verify the presence (or absence) of a bunch of .h files at  
> > \> that location? If they're not there, then you should probably grab a new  
> > \> Ruby install (is this one a package from your distro?).  
> > \>  
> > \>  
> > found this  
> > micke@linux:~/dvl/nexus/nexpre\> ll /usr/lib/ruby/1.8/i586-linux/  
> > total 864  
> > -rwxr-xr-x 1 root root 39492 2006-01-26 15:02 bigdecimal.so  
> > -rwxr-xr-x 1 root root 43408 2006-01-26 15:02 curses.so  
> > -rwxr-xr-x 1 root root 17212 2006-01-26 15:02 dbm.so  
> > drwxr-xr-x 2 root root 152 2006-03-03 09:30 digest  
> > -rwxr-xr-x 1 root root 7236 2006-01-26 15:02 digest.so  
> > -rwxr-xr-x 1 root root 72872 2006-01-26 15:02 dl.so  
> > -rwxr-xr-x 1 root root 6904 2006-01-26 15:02 enumerator.so  
> > -rwxr-xr-x 1 root root 8144 2006-01-26 15:02 etc.so  
> > -rwxr-xr-x 1 root root 4364 2006-01-26 15:02 fcntl.so  
> > -rwxr-xr-x 1 root root 18552 2006-01-26 15:02 gdbm.so  
> > -rwxr-xr-x 1 root root 13036 2006-01-26 15:02 iconv.so  
> > drwxr-xr-x 2 root root 72 2006-03-03 09:30 io  
> > -rwxr-xr-x 1 root root 135712 2006-01-26 15:02 nkf.so  
> > -rwxr-xr-x 1 root root 217928 2006-01-26 15:02 openssl.so  
> > -rwxr-xr-x 1 root root 8960 2006-01-26 15:02 pty.so  
> > drwxr-xr-x 2 root root 80 2006-03-03 09:30 racc  
> > -rw-r--r-- 1 root root 6619 2006-01-26 15:00 rbconfig.rb  
> > -rwxr-xr-x 1 root root 14972 2006-01-26 15:02 readline.so  
> > -rwxr-xr-x 1 root root 22940 2006-01-26 15:02 sdbm.so  
> > -rwxr-xr-x 1 root root 35688 2006-01-26 15:02 socket.so  
> > -rwxr-xr-x 1 root root 16708 2006-01-26 15:02 stringio.so  
> > -rwxr-xr-x 1 root root 15552 2006-01-26 15:02 strscan.so  
> > -rwxr-xr-x 1 root root 89536 2006-01-26 15:02 syck.so  
> > -rwxr-xr-x 1 root root 10560 2006-01-26 15:02 syslog.so  
> > -rwxr-xr-x 1 root root 33008 2006-01-26 15:02 zlib.so
> > 
> > Ruby comes with distro ( SUSE 10)
> > 
> > //Mike
> 
> --  
> Ross Bamford - rosco@roscopeco.REMOVE.co.uk

---

<div class="post-metadata">

**Author:** ![Mikael\_Larsson](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Mikael\_Larsson](https://rubytalk.org/u/Mikael_Larsson)\
**Post date:** [11 March 2006 09:50 UTC](https://rubytalk.org/t/gem-libxml/25644/5 "2006-03-11T09:50:58Z")

</div>

Ross Bamford wrote:

> **···**
>
> > On Sat, 2006-03-11 at 18:22 +0900, Mikael Larsson wrote:  
> > &nbsp;&nbsp;
> > 
> > > Ross Bamford wrote:  
> > > &nbsp;&nbsp;&nbsp;&nbsp;
> > > 
> > > > On Sat, 2006-03-11 at 05:45 +0900, Mikael Larsson wrote:  
> > > > &nbsp;&nbsp;
> > > > 
> > > > > Hi
> > > > > 
> > > > > Wat is wrong here ?? Do I need ruby source?
> > > > > 
> > > > > linux:~ #  
> > > > > linux:~ # ruby -v  
> > > > > ruby 1.8.2 (2004-12-25) [i586-linux]  
> > > > > linux:~ # gem -v  
> > > > > 0.8.11  
> > > > > linux:~ # gem install libxml-ruby  
> > > > > Attempting local installation of 'libxml-ruby'  
> > > > > Local gem file not found: libxml-ruby\*.gem  
> > > > > Attempting remote installation of 'libxml-ruby'  
> > > > > Building native extensions. This could take a while...  
> > > > > can't find header files for ruby.  
> > > > > ERROR: While executing gem ... (RuntimeError)  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;ERROR: Failed to build gem native extension.  
> > > > > Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.6 for inspection.  
> > > > > &nbsp;&nbsp;ruby extconf.rb install libxml-ruby\n
> > > > 
> > > > Hmm, I think that the Ruby headers should always be installed, in your  
> > > > case it looks like they should be at:
> > > > 
> > > > &nbsp;&nbsp;/usr/lib/ruby/1.8/i586-linux/
> > > > 
> > > > Could you verify the presence (or absence) of a bunch of .h files at  
> > > > that location? If they're not there, then you should probably grab a new  
> > > > Ruby install (is this one a package from your distro?).
> > > 
> > > found this  
> > > micke@linux:~/dvl/nexus/nexpre\> ll /usr/lib/ruby/1.8/i586-linux/  
> > > total 864  
> > > -rwxr-xr-x 1 root root 39492 2006-01-26 15:02 bigdecimal.so  
> > > -rwxr-xr-x 1 root root 43408 2006-01-26 15:02 curses.so  
> > > -rwxr-xr-x 1 root root 17212 2006-01-26 15:02 dbm.so  
> > > drwxr-xr-x 2 root root 152 2006-03-03 09:30 digest  
> > > -rwxr-xr-x 1 root root 7236 2006-01-26 15:02 digest.so  
> > > -rwxr-xr-x 1 root root 72872 2006-01-26 15:02 dl.so  
> > > -rwxr-xr-x 1 root root 6904 2006-01-26 15:02 enumerator.so  
> > > -rwxr-xr-x 1 root root 8144 2006-01-26 15:02 etc.so  
> > > -rwxr-xr-x 1 root root 4364 2006-01-26 15:02 fcntl.so  
> > > -rwxr-xr-x 1 root root 18552 2006-01-26 15:02 gdbm.so  
> > > -rwxr-xr-x 1 root root 13036 2006-01-26 15:02 iconv.so  
> > > drwxr-xr-x 2 root root 72 2006-03-03 09:30 io  
> > > -rwxr-xr-x 1 root root 135712 2006-01-26 15:02 nkf.so  
> > > -rwxr-xr-x 1 root root 217928 2006-01-26 15:02 openssl.so  
> > > -rwxr-xr-x 1 root root 8960 2006-01-26 15:02 pty.so  
> > > drwxr-xr-x 2 root root 80 2006-03-03 09:30 racc  
> > > -rw-r--r-- 1 root root 6619 2006-01-26 15:00 rbconfig.rb  
> > > -rwxr-xr-x 1 root root 14972 2006-01-26 15:02 readline.so  
> > > -rwxr-xr-x 1 root root 22940 2006-01-26 15:02 sdbm.so  
> > > -rwxr-xr-x 1 root root 35688 2006-01-26 15:02 socket.so  
> > > -rwxr-xr-x 1 root root 16708 2006-01-26 15:02 stringio.so  
> > > -rwxr-xr-x 1 root root 15552 2006-01-26 15:02 strscan.so  
> > > -rwxr-xr-x 1 root root 89536 2006-01-26 15:02 syck.so  
> > > -rwxr-xr-x 1 root root 10560 2006-01-26 15:02 syslog.so  
> > > -rwxr-xr-x 1 root root 33008 2006-01-26 15:02 zlib.so
> > > 
> > > Ruby comes with distro ( SUSE 10)
> > > 
> > > //Mike  
> > > &nbsp;&nbsp;&nbsp;&nbsp;  
> > > Okay, it seems you're missing the headers. Couple of things you might  
> > > try:
> > 
> > &nbsp;&nbsp;+ Does Suse have a ruby-devel package ? If so, get that.
> > 
> > &nbsp;&nbsp;+ Beg/borrow/steal the appropriate headers, and copy them to  
> > &nbsp;&nbsp;&nbsp;&nbsp;that directory (maybe not a good idea).
> > 
> > &nbsp;&nbsp;+ Alternatively, grab a copy of the source and build it  
> > &nbsp;&nbsp;&nbsp;&nbsp;yourself. You could upgrade to 1.8.4 at the same time 😉
> 
> There was a ruby-devel pakage, now it works!! Thanks for your help
> 
> //Mike
