troubleshooting Question

Getting LibXML2 and perl XML::LibXML working on Windows XP

Avatar of jetbet
jetbetFlag for New Zealand asked on
PerlWindows XPWindows OS
5 Comments1 Solution2913 ViewsLast Modified:
I want to add the following the XML::LibXML perl package to a Windows XP VMWare Virtual Machine.
My perl version is ActivePerl-
I have both PPM and CPAN available on the command line.
I have installed the package via CPAN but it will not build due to LibXML2 not being found.
I have been to to get instructions and downloaded the windows binarys from" and tried to install them.

I have added LibXML2.dll to my system32 folder.
I have created a folder called c:\toolkit, added everything from the bin directory to it and added this to by path variable.
I have called install with LIBS and INC set to my toolkit directory from the CPAN command line.

Although the installation process complained about not being able to find xml2 and libxml2 the LibXML package is installed in my perl\site\lib\XML directory. When I try to run a perl scriprt that was working on an old Windows NT VM (I am upgrading to Windows XP but keeping the same scripts) it complains about not being there.

Installing this by hand gets me the following message;
"Can't locate loadable object for module XML::LibXML::Common in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/site/lib/XML/"

Trying to install Common via CPAN gives me the following error
**************************************************************************************** Going to build P/PH/PHISH/XML-LibXML-Common-0.13.tar.gz

enable native perl UTF8
looking for -lxml2... no
looking for -llibxml2... no
libxml2 not found
Try setting LIBS and INC values on the command line
Or get libxml2 from
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.
Warning: No success on command[C:\Perl\bin\perl.exe Makefile.PL]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
  C:\Perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 PHISH/XML-LibXML-Common-0.13.tar.gz          : writemakefile NO 'C:\Perl\bin\perl.exe Makefile.PL' returned status 512

I have tried downloading NMake and running that, I have looked inside the CPAN perl scripts for what search paths are being used......

Nothing seems to work.

Does anyone know how to get Perl modules with dependencies like this working in windows?
 Everything I have tried seems to point at being on a *nix machine or being a C programmer.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros