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

Hi All, I am trying to migrate a perl script, My admin team installed the packages XML-Parser and then we need to install XML-XPath which is dependency for my perl script. After installed perl package i am getting the following error.
Can't load '/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/auto/X + +ML/Parser/Expat/Expat.so' for module XML::Parser::Expat: Could not +lo +ad module /usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi/aut +o/XM +L/Parser/Expat/Expat.so. Dependent module /usr/lib/libexpat.a(l +ibexpat.so.0) could not +be loaded. Member libexpat.so.0 is not found + in archive Could not load module /usr/opt/perl5/lib/site_perl/5.8.8/ +aix-thread-mu +lti/auto/XML/Parser/Expat/Expat.so. Dependent module / +usr/opt/perl5/lib/site_perl/5.8.8/aix-thread +-multi/auto/XML/Parser/ +Expat/Expat.so could not be loaded. at /usr/op +t/perl5/lib/5.8.8/aix +-thread-multi/DynaLoader.pm line 230. at /usr/opt/perl5/lib/site_perl +/5.8.8/aix-thread-multi/XML/Parser.pm +line 14 Compilation failed in +require at /usr/opt/perl5/lib/site_perl/5.8.8/ai +x-thread-multi/XML/ +Parser.pm line 14. BEGIN failed--compilation aborted at /usr/opt/perl +5/lib/site_perl/5.8. +8/aix-thread-multi/XML/Parser.pm line 18. Compi +lation failed in require at ./send2wpg.sh line 6. BEGIN failed--compi +lation aborted at ./send2wpg.sh line 6.
When i check for Expat.pm location i got below output
find / -name "Expat*" -print 2>/dev/null /opt/freeware/lib/perl5/site_ +perl/5.8.8/ppc-thread-multi/XML/Parser/Ex +pat.pm /opt/freeware/lib/p +erl5/site_perl/5.8.8/ppc-thread-multi/auto/XML/Pars +er/Expat /opt/fr +eeware/lib/perl5/site_perl/5.8.8/ppc-thread-multi/auto/XML/Pars +er/E +xpat/Expat.bs /opt/freeware/lib/perl5/site_perl/5.8.8/ppc-thread-mult +i/auto/XML/Pars +er/Expat/Expat.so /opt/install/XML-Parser-2.41/Expat + /opt/install/XML-Parser-2.41/Expat/Expat.bs /opt/install/XML-Parser- +2.41/Expat/Expat.c /opt/install/XML-Parser-2.41/Expat/Expat.exp /opt/ +install/XML-Parser-2.41/Expat/Expat.o /opt/install/XML-Parser-2.41/Ex +pat/Expat.pm /opt/install/XML-Parser-2.41/Expat/Expat.xs /opt/install +/XML-Parser-2.41/blib/arch/auto/XML/Parser/Expat /opt/install/XML-Par +ser-2.41/blib/arch/auto/XML/Parser/Expat/Expat.bs /opt/install/XML-Pa +rser-2.41/blib/arch/auto/XML/Parser/Expat/Expat.so /opt/install/XML-P +arser-2.41/blib/lib/XML/Parser/Expat.pm /opt/install/XML-Parser-2.41/ +blib/lib/auto/XML/Parser/Expat /usr/opt/perl5/lib/site_perl/5.8.8/aix +-thread-multi/XML/Parser/Expat.p +m /usr/opt/perl5/lib/site_perl/5.8. +8/aix-thread-multi/auto/XML/Parser/Ex +pat /usr/opt/perl5/lib/site_pe +rl/5.8.8/aix-thread-multi/auto/XML/Parser/Ex +pat/Expat.bs /usr/opt/p +erl5/lib/site_perl/5.8.8/aix-thread-multi/auto/XML/Parser/Ex +pat/Exp +at.so /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/XML +/Parser +/Expat.pm /usr/opt/perl5/lib64/site_perl/5.8.8/aix-thread-mu +lti-64all/auto/XML/P +arser/Expat /usr/opt/perl5/lib64/site_perl/5.8. +8/aix-thread-multi-64all/auto/XML/P +arser/Expat/Expat.bs /usr/opt/pe +rl5/lib64/site_perl/5.8.8/aix-thread-multi-64all/auto/XML/P +arser/Ex +pat/Expat.so /wpgdata/scripts/send2wpg/XML-Parser-2.41/Expat /wpgdata +/scripts/send2wpg/XML-Parser-2.41/Expat/Expat.pm /wpgdata/scripts/sen +d2wpg/XML-Parser-2.41/Expat/Expat.xs
Please help me to solve this issue, After long back i am touching my Perl code.


Hi All, Somehow i managed to get my code run, Actually i got some C library error during make, So my admin was not installed this package properly which caused the error. Just now i re-installed the packages for Perl and i am able to get it work. Thanks a lot for your suggestions. -- Thanks&Regards, Gobi S.

Replies are listed 'Best First'.
Re: Unable to use XML::Parser
by Corion (Patriarch) on Jun 17, 2012 at 15:30 UTC
    Dependent module /usr/lib/libexpat.a(libexpat.so.0) could not be loade +d.

    This means that the expat libraries are not installed on that system. Ask your system administrator to install them in the proper location.

Re: Unable to use XML::Parser
by bitingduck (Deacon) on Jun 17, 2012 at 15:34 UTC

    You need to install the Expat library separately, which will vary depending on your platform.