Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I have had great trouble installing modules on Win32. I have been trying to install XML::RSS and XML::Parser. This question is really related to module installing under Win32 in general though. Since the modules previously mentioned are apparently more complicated to install than most (since they require a C compiler), I'll explain the trouble I've been having by installing a simpler module -- lhoward's Number::Spell module.

I've been advised to use CPAN.pm's shell mode to install modules, so I thought I'd give that a try. I run

perl -MCPAN -e shell

from the DOS prompt. I then type 'install Number::Spell'. Lots of information appears, but the program finally exits with:

When installing with CPAN: Subprocess "|C:\WINDOWS\ftp.exe -n" returned status 16777215 (wstat -1) Bad luck... Still failed! Can't access URL ftp://usit.shef.ac.uk/pub/packages/CPAN/authors/id/G/ +GB/GBARR/l ibnet-1.0703.tar.gz.
So, I think to myself, I'll just try 'the hard way'. I downloaded the Number::Spell .tar.gz file. Unzipped and untarred it into a new directory. I understand that I need a make program, so I get both nmake and GNU make. I run

perl makefile.pl

..and get the following error:

Checking if your kit is complete... Looks good Bad command or file name Bad command or file name Unable to find a perl 5 (by these names: C:\perl\bin\Perl.exe miniperl + perl perl 5 perl5.6.0, in these dirs: C:\WINDOWS c:\windows c:\windows\COMMAND C +:\BITWARE\ C:\PERL\BIN c:\perl\bin) Writing Makefile for Number::Spell
Apparently, it can't find Perl on my machine. It's looking for a file named 'c:\perl\bin\perl.exe' in 'c:\perl\bin' which of course it won't find (in my mind it should be looking for perl.exe in c:\perl\bin).

Nevertheless, I try and run make anyway: (I used GNU Make since nmake didn't agree with the syntax of the makefile).

process_begin: CreateProcess((null), 0 -Ic:perllib -Ic:perllib -MExtUt +ils::Comma nd -e mkpath bliblibNumber, ...) failed. make (e=2): The system cannot find the file specified. C:\WINDOWS\MAKE.EXE: *** [blib\lib\Number\.exists] Error 2
This made me a bit suspicious, since from the error message I assumed that make couldn't shell out to Perl. (Hardly surprising I suppose given that makefile.pl couldn't find Perl). I know a little bit about makefiles from a C++ programming course that I did so I thought I'd have a look around. I immediately find 2 lines in the makefile that worry me:

PERL = 0 FULLPERL = 0
After looking in MakeMaker.pm's documentation, my suspicions are confirmed, and I know that these should be set to names of the Perl binary. So I change it to:

PERL = perl.exe FULLPERL = perl.exe
I figure I don't have to provide the absolute path, since I've got c:\perl\bin in my PATH environment variable. I then trying running make again, and get:
mkdir bliblibNumber mkdir blibarchautoNumberSpell mkdir bliblibautoNumberSpell mkdir blibman3
These directory names look like they're missing slashes to me. But I think "What the heck" and just trying doing 'make install' anyway. I get:
Writing c:\perl\lib\site\auto\Number\Spell\.packlist mkdir c:perllib Appending installation info to c:\perl\lib/perllocal.pod
Again, the dir name in the mkdir line looks suspicious.

I just hoped that it might just have installed the module, so I write a quick one-liner to test it out:

perl -e "use Number::Spell;"
and I get the dreaded "Cannot locate Number/Spell.pm in @INC" etc error.

CPAN is often cited as a major advantage of Perl, and undoubtedly it is. Popular CPAN modules like LWP which have now made it into the standard Perl distro have undoubtedly saved me hours of time, but I don't see why these modules are so hard to install. I know it may be easier on UNIX, but I tend to my development work on Win32 and then deploy on UNIX, so I really need modules installed on Win32.

I'm using ActiveState Perl so I thought I'd try PPM, but there aren't packages available for the modules I want, and I've had plenty of other issues with it.

Any help is greatly appreciated.


In reply to Installing modules on Win32 by SuperCruncher

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (15)
    As of 2014-09-18 16:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (118 votes), past polls