views:

1332

answers:

2

I am new to Perl and I am using ActivePerl. I am getting the following error:

Can't locate XML/LibXML.pm in @INC...

I have tried everything but cannot find the steps to install the "correct" module for XML::LibXML.

Here is exactly what is going on. I am running a script from a command prompt:

c:\temp>perl myscript.pl

The first few lines of myscript.pl:

#!/usr/bin/perl

use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use HTTP::Date;
use XML::Parser;
use LWP::UserAgent;
use XML::LibXML;
use Archive::Extract;
use Encode;
use LWP::Simple;

require HTTP::Request;
...

Then I get this error:

c:\temp>perl myscript.pl Can't locate XML/LibXML.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at myscript.pl line 7. BEGIN failed--compilation aborted at myscript.pl line 7

+4  A: 

You should be able to install it with the ActivePerl Perl Package Manager. There should have been a start menu shortcut created when you installed ActivePerl, start the GUI and search for libxml.

--edit

Here's a post on adding an alternative repository to PPM and installing XML-LibXML

robertc
Thanks, But I installed "libxml-perl" from the "ActivePerl Package Manager" and I still get the same error. I checked the details and that package does not install LibXML.pm Here is a screen shot http://bit.ly/cf3av
Jamey McElveen
Try searching for xml-libxml.
robertc
Nope nothing is coming up... I added some more details to the question. thanks!
Jamey McElveen
This package is currently available with the package manager: I just installed it.
MikeEL
+2  A: 

It doesn't look like ActiveState provide a PPM with XML::LibXML. I looked in the README for the module on CPAN and apparently a prebuild ppm package is available here.

Martin Skøtt