ITSAMB has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,
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 http://theoryx5.uwinnipeg.ca/ppmpackages/ and The command is
ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.ppd
It throws following error and quit
Installing package 'http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.ppd'... Error installing package 'http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.pp d': Read a PPD for 'http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.ppd', 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 http://trouchelle.com/ppm/XML-LibXML.ppd
ppm install http://ppm.tcool.org/archives/XML-LibXML.ppd
ppm install http://theoryx5.uwinnipeg.ca/ppms/XML-LibXML.ppd
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
Thanks,
Amit

Replies are listed 'Best First'.
Re: Help - Install XML-LibXML on windows
by syphilis (Archbishop) on Feb 20, 2009 at 06:03 UTC
    ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/XML-LibXML.ppd

    Wrong link - that's the perl-5.6.x repository.
    For your version of perl (5.8.2) you want:
    ppm install http://theoryx5.uwinnipeg.ca/ppms/XML-LibXML.ppd
    Cheers,
    Rob
Re: Help - Install XML-LibXML on windows
by Bloodnok (Vicar) on Feb 19, 2009 at 23:52 UTC
    Hmmm, a couple of questions readily present themselves:
    • Why the bespoke AS perl ? and...
    • What's the basis for your aversion to C ?
    Presumably, the answer to the latter is the perceived requirement for VC++ or similar and all the attendant expense, disk space and other troubles...

    Why not try Strawberry Perl(5.8.8 still available for download) - it comes bundled with GNU make and gcc and ... better still, allows you to use the standard CPAN based download &/or installation of modules (& their dependencies).

    To my mind, that (Strawberry Perl) and gvim (not forgetting a live inter-web connection, for convenience:-) make the bes6t of bad job and present the best possible perl dev environment on Windoze

    A user level that continues to overstate my experience :-))
Re: Help - Install XML-LibXML on windows
by dHarry (Abbot) on Feb 20, 2009 at 07:34 UTC

    Installing libxml under Windows can be a nightmare, i.e. especially via ppm. I ran into trouble myself, see Re: use XML::LibXML; is causing compile error. I think under Windows it's best to build libxml yourself and not use the ppm packages. So you need a C compiler and you will also need nmake too.

      ... se Re: use XML::LibXML; is causing compile error

      Yes, XML-LibXML has quite a few dependencies - anyone wanting to install the uwinnipeg ppm for perl-5.8 would be well advised to first add it to the list of repo's (unless it's already there):
      ppm repo add http://theoryx5.uwinnipeg.ca/ppms/
      Then it's just a matter of:
      C:\_32>ppm install http://theoryx5.uwinnipeg.ca/ppms/XML-LibXML.ppd Downloading XML-LibXML-1.64...done Downloading XML-SAX-0.96...done Downloading XML-NamespaceSupport-1.09...done Downloading XML-LibXML-Common-0.13...done Unpacking XML-LibXML-1.64...done Unpacking XML-SAX-0.96...done Unpacking XML-NamespaceSupport-1.09...done Unpacking XML-LibXML-Common-0.13...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 Generating HTML for XML-LibXML-Common-0.13...done Updating files in site area...done Downloading XML-LibXML-Common-0.13 install script...done Running XML-LibXML-Common-0.13 install script...Set up gcc environment + - 3.4.5 mingw-vista special r3) 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 http://theoryx5.uwinnipeg.ca/ppms/scripts/libxml2.dll ... do +ne! Where should libxml2.dll be placed? [C:\_32\ap824\bin] libxml2.dll has been successfully installed to C:/_32/ap824/bin done Downloading XML-LibXML-1.64 install script...done Running XML-LibXML-1.64 install script...Set up gcc environment - 3.4. +5 (mingw- ista special r3) Do you want to alter ParserDetails.ini? [yes] C:\_32\ap824\bin\perl.exe -MXML::SAX -e "XML::SAX->add_parser(q(XML::L +ibXML::SA ::Parser))->save_parsers()" C:\_32\ap824\bin\perl.exe -MXML::SAX -e "XML::SAX->add_parser(q(XML::L +ibXML::SA ))->save_parsers()" done 103 files installed C:\_32>perl -le "use XML::LibXML; print $XML::LibXML::VERSION" 1.64
      (Where prompted, I just accepted the default.)

      Still no toFH via package XML::LibXML::Document but. (I checked.)

      Cheers,
      Rob

        Couldn't make it work with ActiveState's ppm/binaries, submitted a bug, never heard anything since. In any case I had to switch to Linux for other stuff. So far so good:-)

        Cheers,
        Harry