For ActivePerl on Windows, XML :: LibXML is no longer available through PPM due to the absence of dependencies that need to be installed manually.
Installing via CPAN is the right way, but you need to make sure libxml2 and its dependencies are present. They are required by XML :: LibXML.
The installation (taken from here , thanks to Rudy Rodriguez) is a long and winding road, but it works (Win 8.1, ActivePerl 5.20.1 x64):
Get the required binary package libxml2, iconv, zlib (all from here ) and gettext-tools .
Extract all the files into one directory (for example, C: \ perl_libxml \ merged) so that the files from the include, lib subdirectories, etc. in each zip file were extracted into one common directory include, lib, etc.
move the / libxml 2 / libxml folder one level up, i.e. in / libxml since this is the expected default directory
rename libz.a to zlib.a (in the lib directory)
install dependencies
ppm install dmake MinGW XML::NamespaceSupport XML::SAX
- add c: \ perl_libxml \ merged \ bin in Windows PATH
- change to the directory where the failed cpan build is located, for example. C: \ perl64 \ CPAN \ build \ XML-LibXML & lt; ...>
mileage:
Makefile.PL INC=-IC:\perl_libxml\merged\include LIBS=-LC:\perl_libxml\merged\lib
Building a Makefile must be successful. If not, check if the LIBS and INC parameter points to the right directory
dmake
If this fails, verify that your path entry is set correctly.
dmake test
If the "dmake test" fails with cryptic errors, for example:
load_file:%1 is not a valid Win32 application at C:/Perl64/lib/DynaLoader.pm line 191
it is possible that different versions of some libraries are present in your PATH and therefore linked at build time.
I had another MinGW environment in my PATH that led to the linking of the wrong libraries. I could solve this by examining the built-in libxml.dll using the SDK- dependent tool for the Windows Server 2003 platform . You can see which DLL is used by libxml.dll and for which platform it was compiled. All of them must match and match your version of Perl, either x86 or x64.
If the tests succeed, finally install XML :: LibXML with
dmake install
Sidenote: I know this question is quite old, but I put this solution here as a link for others working on the same problem in the future (maybe I am one of them ...).
source share