SuperCruncher has asked for the wisdom of the Perl Monks concerning the following question:
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:
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 runWhen 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.
perl makefile.pl
..and get the following error:
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).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
Nevertheless, I try and run make anyway: (I used GNU Make since nmake didn't agree with the syntax of the makefile).
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: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
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 = 0 FULLPERL = 0
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:PERL = perl.exe FULLPERL = perl.exe
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:mkdir bliblibNumber mkdir blibarchautoNumberSpell mkdir bliblibautoNumberSpell mkdir blibman3
Again, the dir name in the mkdir line looks suspicious.Writing c:\perl\lib\site\auto\Number\Spell\.packlist mkdir c:perllib Appending installation info to c:\perl\lib/perllocal.pod
I just hoped that it might just have installed the module, so I write a quick one-liner to test it out:
and I get the dreaded "Cannot locate Number/Spell.pm in @INC" etc error.perl -e "use Number::Spell;"
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
(jcwren) RE: Installing modules on Win32
by jcwren (Prior) on Jul 17, 2000 at 00:53 UTC | |
Re: Installing modules on Win32
by gaggio (Friar) on Jul 17, 2000 at 05:47 UTC | |
by Guildenstern (Deacon) on Aug 28, 2000 at 22:55 UTC | |
Re: Installing modules on Win32
by Shoeboy (Sexton) on Jul 17, 2000 at 04:49 UTC | |
Re: Installing modules on Win32
by tye (Sage) on Jul 17, 2000 at 21:33 UTC | |
Re: Installing modules on Win32
by Ugly (Beadle) on Jul 17, 2000 at 16:15 UTC | |
Re: Installing modules on Win32
by toadi (Chaplain) on Jul 17, 2000 at 16:03 UTC | |
Re: Installing modules on Win32
by Tally (Novice) on Jul 17, 2000 at 21:22 UTC | |
by Anonymous Monk on Jun 01, 2001 at 17:26 UTC | |
Re: Installing modules on Win32
by cik_ail (Initiate) on Feb 25, 2005 at 03:06 UTC | |
by holli (Abbot) on Feb 25, 2005 at 03:22 UTC | |
by cik_ail (Initiate) on Feb 25, 2005 at 04:19 UTC | |
by holli (Abbot) on Feb 25, 2005 at 08:03 UTC | |
by cik_ail (Initiate) on Feb 25, 2005 at 08:32 UTC | |
|