How do I install XML::LibXML for ActivePerl?
Solution 1
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
Solution 2
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.
Solution 3
I have recently been through the pains of getting XML::LibXML installed. Here is what I found:
- We are using ActiveState ActivePerl 5.8.8
- In order for ActivePerl's PPM to get through our proxy, had to create an environment variable "http_proxy" with value "http://proxy.ext.[example].com", then re-login.
- The required packages weren't all located in ActiveState's repository. Added University of Winnipeg's Perl Repository http://theoryx5.uwinnipeg.ca/ppms/package.xml (note that the exact repository used depends on your version of ActivePerl)
- Manually install the following DLLs into C:\perl\bin\ (for whatever reason, I was having some trouble building these DLLs, so I ended up simply grabbing them from the repository at http://trouchelle.com/ppm/dll/ )
- iconv.dll
- libxml2.dll
- zlib1.dll
- At least for the version of XML-LibXML we are using, the package installer doesn't work correctly for the prerequisite XML-LibXML-Common. You MUST install the package XML-LibXML-Common by itself, BEFORE installing the rest of XML-LibXML.
Although they may not be the latest versions, the versions of the packages (including prerequisites) which I am currently using are:
- XML-LibXML-Common (ver 0.13)
- XML-LibXML (ver 1.64)
- XML-NamespaceSupport (ver 1.10)
- XML-SAX (ver 0.96)
Solution 4
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:
Jamey McElveen
I am a Christian, I have three boys, Jake, Slater, Seth and a beautiful wife Connie. Application developer using primarily .NET/C#. I am using Objective-C for iPhone development. In the past I have also developed in Java, and Delphi.
Updated on August 31, 2020Comments
-
Jamey McElveen over 3 years
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
-
Jamey McElveen over 14 yearsThanks, 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 bit.ly/cf3av
-
robertc over 14 yearsTry searching for xml-libxml.
-
Jamey McElveen over 14 yearsNope nothing is coming up... I added some more details to the question. thanks!
-
MikeEL almost 14 yearsThis package is currently available with the package manager: I just installed it.
-
laurentngu over 11 yearsI have the same issue today. Did you just copy those 3 .dll in the folder C:\Perl\bin\ ? Using search from ppm, it only returns libxml-perl [0.08] libxml-perl
-
Dhir Pratap over 11 yearsabove link is 503 error for me, but sources available from cpan here search.cpan.org/perldoc?XML%3A%3ALibXML
-
Dhir Pratap over 11 yearsxml-libxml does not install a LibXML.pm for me. Using ActivePerl 5.16 and PPM 4.17. Unfortunately the theoryx5 repo in the forum link returns 503 errors.
-
Dhir Pratap over 11 yearsApparently there's no LibXML.pm on 5.16. See my answer below for fix.
-
sn00gan almost 11 yearsYes, I just copied those 3 DLLs which I described.