1

So, I'm trying to install libxslt-ruby (http://rubydoc.info/gems/libxslt-ruby/1.0.8/frames) so that I can use the word_parsing gem (http://rubygems.org/gems/word_parsing), but I'm getting an error that says I don't have some of the required lib files. How do I solve this? are they already on my system (Mac Lion)?

I've found that libxslt-ruby only requires the following:

libm (math routines: very standard)
libz (zlib)
libiconv
libxml2
libxslt

and, I have all of those in my /usr/bin directory (as dylib's)

here is the error:

sudo gem install libxslt-ruby-1.0.8.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing libxslt-ruby-1.0.8.gem:
    ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for ruby/io.h... no
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... yes
checking for xmlXPtrNewRange() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for xsltApplyStylesheet() in -lxslt... yes
checking for xslt.h... no
checking for xslt.h in /opt/include/libxslt,/usr/local/include/libxslt,/usr/include/libxslt... yes
checking for exsltRegisterAll() in -lexslt... yes
checking for exslt.h... no
checking for exslt.h in /opt/include/libexslt,/usr/local/include/libexslt,/usr/include/libexslt... yes
*** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --with-iconv-dir
    --without-iconv-dir
    --with-iconv-include
    --without-iconv-include=${iconv-dir}/include
    --with-iconv-lib
    --without-iconv-lib=${iconv-dir}/lib
    --with-xml2-dir
    --without-xml2-dir
    --with-xml2-include
    --without-xml2-include=${xml2-dir}/include
    --with-xml2-lib
    --without-xml2-lib=${xml2-dir}/lib
    --with-xslt-dir
    --without-xslt-dir
    --with-xslt-include
    --without-xslt-include=${xslt-dir}/include
    --with-xslt-lib
    --without-xslt-lib=${xslt-dir}/lib
    --with-exslt-dir
    --without-exslt-dir
    --with-exslt-include
    --without-exslt-include=${exslt-dir}/include
    --with-exslt-lib
    --without-exslt-lib=${exslt-dir}/lib
    --with-zlib
    --without-zlib
    --with-iconvlib
    --without-iconvlib
    --with-xml2lib
    --without-xml2lib
    --with-xsltlib
    --without-xsltlib
    --with-exsltlib
    --without-exsltlib
extconf.rb:114: undefined method `find_by_name' for Gem::Specification:Class (NoMethodError)
NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352
  • You are missing the developer versions of those libraries that contain the appropriate header information. – Marc Talbot Feb 07 '12 at 16:17
  • developer versions? how do I get those? cause I have Xcode installed, why wouldn't it have come with a dev version of everything? – NullVoxPopuli Feb 07 '12 at 16:26
  • do you need to install it on system-ruby? otherwise have a look at rbenv or rvm. it might be worth checking out installing it for different ruby versions. – phoet Feb 07 '12 at 20:18
  • I have RVM, and use it with projects, but that wouldn't affect this, would it? – NullVoxPopuli Feb 07 '12 at 20:26

0 Answers0