Experts,
I need your help on installing Perl XML Parser.
What is the complete procedure to install XML modules from a build HP machine to another HP machine?
I want to use XML:XPath in my perl script and I learn that I need Expat, XML::Parser, and XML::XPath modules.
I downloaded expat-1.95.7.tar.gz, XML-Parser-2.34.tar.gz, and XML-XPath-1.13.tar.gz. Following the instruction I installed Expat, XML-Parser, and XML-XPath to my build machine.
The additions put to the build machine include:./site_perl/5.6.1/PA-RISC2.0-11.11-NTM/auto/XML ./site_perl/5.6.1/PA-RISC2.0-11.11-NTM/XML ./site_perl/5.6.1/XMLand a few library under /usr/lib:
$ ls libexp* llibexpat.a libexpat.sl libexpat.sl.5.0 libexpat.la libexpat.sl.5
I noticed that the I could run Perl XML::XPath fine.
But when I copied the modules to my test machine (also HP): all the directories and files mentioned above, plus "/opt/perl5/lib/5.6.1/PA-RISC2.0-11.11-NTM/perllocal.pod" which I believe tells where to find the right Perl module, my test script failed to run.
The errors are:
hput4# /opt/perl5/bin/perl -wc /home/chlai/rje/test.cgi Can't load '/opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0-11.11-NTM/auto/XML/Parser/Expat/Expat.sl' for module XML::Parser::Expat: No such file or directory at /opt/perl5/lib/5.6.1/PA-RISC2.0-11.11-NTM/DynaLoader.pm line 206. at /opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0-11.11-NTM/XML/Parser.pm line 14 Compilation failed in require at /opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0-11.11-NTM/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0-11.11-NTM/XML/Parser.pm line 18. Compilation failed in require at /opt/perl5/lib/site_perl/5.6.1/XML/XPath/XMLParser.pm line 7. BEGIN failed--compilation aborted at /opt/perl5/lib/site_perl/5.6.1/XML/XPath/XMLParser.pm line 7. Compilation failed in require at /opt/perl5/lib/site_perl/5.6.1/XML/XPath.pm line 13. BEGIN failed--compilation aborted at /opt/perl5/lib/site_perl/5.6.1/XML/XPath.pm line 13. Compilation failed in require at /home/chlai/rje/test.cgi line 1. BEGIN failed--compilation aborted at /home/chlai/rje/test.cgi line 1.
I checked, the Expat.sl actually IS there!
What did I miss? What else should I do to make the XML Parser work?
Any help is appreciated!
Kevin chlai@lucent.com
20040702 Edit by [Corion]: Added formatting
It sounds like you're missing some dependencies.
The easiest thing to do is to use the CPAN module instead of manual installation. Try perl -MCPAN -e shell as root. If it's the first time you've run it, go through the configuration. Then type install XML::XPath, and say yes whenever it asks if it should fetch dependencies. This method is by far the easiest way to install CPAN modules.
The the errors I got were:
hput4# perl -MCPAN -e shell
Can't load '/usr/local/lib/perl5/5.00503/PA-RISC1.1/auto/IO/IO.sl' for module IO: Invalid argument at /usr/local/lib/perl5/5.00503/PA-RISC1.1/DynaLoader.pm line 169.
at /usr/local/lib/perl5/5.00503/PA-RISC1.1/IO/Handle.pm line 248
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.00503/PA-RISC1.1/IO/Seekable.pm line 50.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.00503/PA-RISC1.1/IO/File.pm line 111.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.00503/CPAN.pm line 27.
BEGIN failed--compilation aborted.
Thank you very much!
Kevin
perlmonks.org content © perlmonks.org and canhai, nightwatch
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03