Nalina has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks
In one of the scripts I use XML::Parser::PerlSAX module. When I tried to run the script I get an error saying
Can't load '/opt/perl_32/lib/site_perl/5.8.7/PA-RISC1.1-thread-multi/a +uto/XML/Parser/Expat/Expat.sl' for module XML::Parser::Expat: No such + file or directory at /opt/perl_32/lib/5.8.7/PA-RISC1.1-thread-multi/ +DynaLoader.pm line 230. at /opt/perl_32/lib/site_perl/5.8.7/PA-RISC1. +1-thread-multi/XML/Parser.pm line 14 Compilation failed in require at /opt/perl_32/lib/site_perl/5.8.7/PA-R +ISC1.1-thread-multi/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /opt/perl_32/lib/site_perl/5.8.7/ +PA-RISC1.1-thread-multi/XML/Parser.pm line 18. Compilation failed in require at /opt/perl_32/lib/site_perl/5.8.7/XML/ +Parser/PerlSAX.pm line 13. BEGIN failed--compilation aborted at /opt/perl_32/lib/site_perl/5.8.7/ +XML/Parser/PerlSAX.pm line 13. Compilation failed in require at /dcs800/cs/bin/dborFileReady.pl line +5. BEGIN failed--compilation aborted at /dcs800/cs/bin/dborFileReady.pl l +ine 5. 06.1</dcs800/cs/bin>
though the Expat.sl file is present in the required directory. Please help.
Thanks in advance

Replies are listed 'Best First'.
Re: Problem with XML::Parser::PerlSAX module
by GrandFather (Saint) on Apr 22, 2006 at 18:17 UTC

    I'd guess that you havea broken install of XML::Parser::PerlSAX. There may be a code issue - just a moment <psychic> ... </psychic>, nope just can seem to see your code or any sample data, sorry.

    It may help if you give us a little more information . OS, Perl version and module version would maybe help. A small code sample and data showing the problem would likely help a lot (see I know what I mean. Why don't you? for hints for writing the code and imbedding the data).


    DWIM is Perl's answer to Gödel
Re: Problem with XML::Parser::PerlSAX module
by El Linko (Beadle) on Apr 23, 2006 at 02:21 UTC
    The error message is somewhat misleading. The problem isn't with Expat.sl it is with a shared library Expat.sl uses.

    chatr /opt/perl_32/lib/site_perl/5.8.7/PA-RISC1.1-thread-multi/auto/XML/Parser/Expat/Expat.sl
    will show you what libraries Expat.sl depends on and where they should be located. It will also tell you if Expat.sl has SHLIB_PATH enabled. If it is enabled and the dependencies are installed in a unexpected directory then add that directory to your shells SHLIB_PATH env variables (eg export SHLIB_PATH=$SHLIB_PATH:/where/ever/the/missing/lib/is/ )