Powered by
Movable Type 3.38 mod_perl/2

Linux scrapi libtidy.so fail

If you want to use scrapi on AMD64 (or any any OS/Plattform than Windows, Linux/i386 or OSX) you'll run into some caveats:

Scraper::Reader::HTMLParseError: Scraper::Reader::HTMLParseError: Unable to load /var/lib/gems/1.8/gems/scrapi-1.2.0/lib/scraper/../tidy/libtidy.dylib

Scrapi comes with precompiled libtidy.so (i386) and libtidy.dll. Just replacing libtidy.so with the one from Debian/Lenny will lead to segfault.


/var/lib/gems/1.8/gems/tidy-1.1.2/lib/tidy/tidybuf.rb:39: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Aborted

A quick'n'dirty hack is to use the one from Etch. Just copy libtidy.so to /var/lib/gems/1.8/gems/scrapi-1.2.0/lib/tidy.

Now bug the developer why he has to include binary-crap.


TrackBack URL for this entry:
http://anti.teamidiot.de/mt-tb/128

Comments (1)

Worked great for me, thanks!

Here's an example of how to get the library files from Etch for an Ubuntu/Debian AMD64 machine and extract them:

wget http://ftp.us.debian.org/debian/pool/main/t/tidy/libtidy-0.99-0_20051018-1_amd64.deb
dpkg --unpack libtidy-0.99-0_20051018-1_amd64.deb
cd /usr/lib/ruby/gems/1.8/gems/scrapi-1.2.0/lib/tidy
mv libtidy.so libtidy.so.SAVED
cp /usr/lib/libtidy.so .
dpk --remove libtidy-0.99-0

Obviously your own directories for the location of Ruby and the Scrapi GEM might be different. You can find yours with:

find / | grep libtidy.so