CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Help - Install XML-LibXML on windows



Feb 19, 2009, 11:01 AM

Post #1 of 8 (5763 views)
Help - Install XML-LibXML on windows Can't Post

Hello gurus,
I need your help in installing a Perl module. I am trying to install XML::LibXML on development server from couple of days now. I do not want to compile and install the module manually, as it needs some C components.
I would like to install the binary distribution of this module for windows.
I tried to install the binary module with PPM from following site and the command is
ppm install

It throws following error and quit
Installing package ''...
Error installing package '
d': Read a PPD for '', but it is not intended for this build of Perl (MSWin32-x86-multi-5.8)

Then, I tried with packages from other sites as well.
ppm install
ppm install
ppm install

But got the same error.
The Perl on which I am trying the installation is a customized version for a product with version "v5.8.2 built for MSWin32-x86-multi". I installed PPM on it with version 2.1.6.
I am not getting any clue here, how to go. Any help is appreciated.
OS=>Windows server 2003 SP2 Perl=>v5.8.2 built for MSWin32-x86-multi PPM=>2.1.6 >


Veteran / Moderator

Feb 19, 2009, 11:45 AM

Post #2 of 8 (5761 views)
Re: [ITSAMB] Help - Install XML-LibXML on windows [In reply to] Can't Post

The problem appears to be that you're trying to install the module from the 5.6 repositories. You need to use the 5.8 repositories.

Try this repository

Veteran / Moderator

Feb 19, 2009, 11:50 AM

Post #3 of 8 (5760 views)
Re: [FishMonger] Help - Install XML-LibXML on windows [In reply to] Can't Post

Oops, I didn't see that you did try that repository.

If it fails when using the 5.8 reposities, then the only other thing I can think of is that there's something in your custom build that it doesn't like, or is missing.

You may need to build the module from source.


Feb 19, 2009, 12:16 PM

Post #4 of 8 (5756 views)
Re: [FishMonger] Help - Install XML-LibXML on windows [In reply to] Can't Post

In Reply To
You may need to build the module from source.

Hi FishMonger,
I was trying to avoid that, as I may need to do in production later and so was trying to find minimal steps required.
Any way, I did try that with source as well. But I think I am not clear here. I downloaded the XML-LibXML-1.69 from cpan. I read the README file and followed the instructions.
1. Download the,, and unzip it.
2. Combine all the bin, include, and lib directories under a directory and then
3. Tried following command from the folder where the XML-LibXML-1.69 is unzipped.
iwperl Makefile.PL INC=-ID:\iw-home\iw-perl\site\lib\LibXML\include LIBS=-LD:\iw-home\iw-perl\site\lib\LibXML\lib
But, it gives following error
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.
Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program.

It mentions that, your system should be set up to compile modules that use C components. Does that mean, I need to have a separate C compiler here? If yes, could you suggest any simple C compiler?

Veteran / Moderator

Feb 19, 2009, 12:39 PM

Post #5 of 8 (5754 views)
Re: [ITSAMB] Help - Install XML-LibXML on windows [In reply to] Can't Post

Install nmake

Another option is to install via the cpan shell. First, install nmake, then cygwin.
Once they are installed, you can build/install modules like this:

C:\>perl -MCPAN -e shell
Set up gcc environment - 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Exiting subroutine via last at C:/Perl/lib/ line 1450.

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled

cpan> install XML::LibXML
CPAN: Storable loaded ok (v2.18)
Going to read C:\Perl\cpan\Metadata

The first time you run the shell, it will ask you a bunch of config questions.

One of the advantages of using the cpan shell is that it can be configured to find and install all dependencies.

(This post was edited by FishMonger on Feb 19, 2009, 12:40 PM)


Feb 19, 2009, 2:39 PM

Post #6 of 8 (5747 views)
Re: [FishMonger] Help - Install XML-LibXML on windows [In reply to] Can't Post

Hi FishMonger,
Thanks for your suggestion.
I tried the above. I already had nmake installed. I installed the Cygwin and tried the command install XML::LibXML.
But it did a long process to load the tar file and then end up showing the same error as above.

Veteran / Moderator

Feb 19, 2009, 3:36 PM

Post #7 of 8 (5742 views)
Re: [ITSAMB] Help - Install XML-LibXML on windows [In reply to] Can't Post

First install libxml2 and then try installing the module.

It still may throw an error on another missing lib file, if so install the missing item(s) then go back and try the module install.

Veteran / Moderator

Feb 19, 2009, 4:09 PM

Post #8 of 8 (5742 views)
Re: [ITSAMB] Help - Install XML-LibXML on windows [In reply to] Can't Post

You may need to install XML-LibXML-Common.ppd before installing XML-LibXM

Here are the results of my install after I installed libxml2

C:\>ppm install
ppm install failed: Can't find any package that provide XML-LibXML-Common for XML-LibXML

C:\>ppm install
Downloading XML-LibXML-Common-0.13...done
Unpacking XML-LibXML-Common-0.13...done
Generating HTML for XML-LibXML-Common-0.13...done
Installing to site area...done
Downloading XML-LibXML-Common-0.13 install script...done
Running XML-LibXML-Common-0.13 install script...
The library libxml2.dll is needed to complete the installation,
and should be placed in a directory somewhere in your PATH
environment variable. I can fetch and install this for you,
if you don't already have it.

Fetch libxml2.dll? [yes]
Fetching ... done!
Where should libxml2.dll be placed? [C:\Perl\bin]
libxml2.dll has been successfully installed to C:/Perl/bin
7 files installed

C:\>ppm install
Downloading XML-LibXML-1.64...done
Downloading XML-SAX-0.96...done
Downloading XML-NamespaceSupport-1.09...done
Unpacking XML-LibXML-1.64...done
Unpacking XML-SAX-0.96...done
Unpacking XML-NamespaceSupport-1.09...done
Generating HTML for XML-LibXML-1.64...done
Generating HTML for XML-SAX-0.96...done
Generating HTML for XML-NamespaceSupport-1.09...done
Installing to site area...done
Downloading XML-LibXML-1.64 install script...done
Running XML-LibXML-1.64 install script...
Do you want to alter ParserDetails.ini? [yes]
C:\Perl\bin\perl.exe -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
C:\Perl\bin\perl.exe -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX))->save_parsers()" done
96 files installed


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives