Reputation: 18305
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
Upvotes: 6
Views: 26101
Reputation:
In the end I found the only alternative ActivePerl repository in existence, as far as I can tell, and it had a package for XML::LibXML 2.0121 which will install on perl versions up to 5.20.x.
You can obtain releases of ActivePerl from here that includes 5.20.2: downloads.activestate.com/ActivePerl/releases/
The alternative repository is called Bribes de Perl at bribes.org/perl/
The URL of the repository that is entered in options is http://bribes.org/perl/ppm/
Upvotes: 0
Reputation: 11642
Accepted answer didn't work for me on 5.16. From this question:
XML::LibXML was not ready for Perl 5.16. Install 5.14
Download:
Upvotes: 1
Reputation: 69
I have recently been through the pains of getting XML::LibXML installed. Here is what I found:
Although they may not be the latest versions, the versions of the packages (including prerequisites) which I am currently using are:
Upvotes: 2
Reputation: 75707
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 xml-libxml and libxml-perl.
--edit
Here's a post on adding an alternative repository to PPM and installing XML-LibXML
Upvotes: 7