Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Can't install CPAN modules on XP

by elef (Friar)
on Jul 01, 2010 at 14:03 UTC ( [id://847523]=perlquestion: print w/replies, xml ) Need Help??

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

Hello everyone, Perl newbie here so please bear with me. I'm on Win XP with activeperl v5.10.0.

I'm trying to get some modules from CPAN to work. First, I ran into this problem and solved it by changing the config file: http://www.perlmonks.org/?node_id=706074

That seems to have worked, now I get a different error message when trying to install any module: nmake doesn't work (not recongised as an internal or external command).

Here's the output:

cpan shell -- CPAN exploration and modules installation (v1.9205) ReadLine support enabled cpan> install HTML::Entities CPAN: Storable loaded ok (v2.18) Going to read C:\Perl\cpan\Metadata Database was generated on Wed, 30 Jun 2010 21:27:04 GMT Running install for module 'HTML::Entities' Running make for G/GA/GAAS/HTML-Parser-3.65.tar.gz CPAN: Digest::SHA loaded ok (v5.45) CPAN: LWP::UserAgent loaded ok (v5.810) CPAN: Time::HiRes loaded ok (v1.9711) Warning (usually harmless): 'YAML' not installed, cannot parse 'C:\Per +l\cpan\FTP stats.yml' Warning (usually harmless): 'YAML' not installed, cannot parse 'C:\Per +l\cpan\FTP stats.yml' Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/G/GA/GAAS/CHECKSUMS Checksum for C:\Perl\cpan\sources\authors\id\G\GA\GAAS\HTML-Parser-3.6 +5.tar.gz o k Scanning cache C:\Perl/cpan/build for sizes ...................................................................... +......DONE CPAN: Archive::Tar loaded ok (v1.38_01) HTML-Parser-3.65/ [I deleted most of this list to save space] HTML-Parser-3.65/eg/htextsub HTML-Parser-3.65/eg/htitle CPAN: File::Temp loaded ok (v0.18) CPAN.pm: Going to build G/GA/GAAS/HTML-Parser-3.65.tar.gz Checking if your kit is complete... Looks good Writing Makefile for HTML::Parser Could not read 'C:\Perl\cpan\build\HTML-Parser-3.65-1Df2xu\META.yml'. +Falling ba ck to other methods to determine prerequisites A megadott nevet (nmake) a rendszer nem ismeri fel belső vagy külső parancsként, futtatható programként vagy kö +tegfájlként. GAAS/HTML-Parser-3.65.tar.gz nmake -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent stat e Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: GAAS/HTML-Parser-3.65.tar.gz : make NO cpan>

The key issue seems to be "A megadott nevet (nmake) a rendszer nem ismeri fel belső vagy külső parancsként, futtatható programként vagy kötegfájlként." which means nmake is not recongised as an internal or external command, a program or a batch file.

Do I need to install nmake? From where, how? I'd be greatful for a step by step.

Thanks for any help.

Update: Resolved by using PPM instead of the cpan shell.

Replies are listed 'Best First'.
Re: Can't install CPAN modules on XP
by VinsWorldcom (Prior) on Jul 01, 2010 at 14:11 UTC

    If you're using Activestate Perl (which it seems you are from your OP), you can just use Perl Package Manager to install/updated modules.

    From the "Start" menu, select "Run", type 'cmd' and press "OK". In the Command Prompt, type 'ppm' and press enter. Alternatively, you could just Start -> Run -> ppm, if Windows knows were to find it (C:\Perl\bin is in your path).

    That should allow you to install pre-built modules.

    If you still want to 'CPAN' modules the hard way, use PPM to install 'dmake'. You can get Microsoft's 'nmake' if you have Visual C++ installed - I'm guessing you don't otherwise you'd have nmake already.

    ppm install dmake
      Thanks, sounds good. Just checked and the perl package manager seems to work. It can't find a module I need, though. Any idea why? It's this one: http://search.cpan.org/~kilinrax/HTML-Strip-1.06/ It doesn't show up and HTML-Strip in PPM and if I search for the author (Bowley) I only get one of his 3 modules on CPAN: HTML-SyntaxHighlighter. Does PPM only offer a limited subset of the modules on CPAN? Do I need to add some repository or another?
Re: Can't install CPAN modules on XP
by marto (Cardinal) on Jul 01, 2010 at 14:11 UTC

    Exit your cpan session. From the command prompt type:

    c:\ppm install mingw

    To install MinGW tools (gcc etc) along with dmake. This will help when trying to use cpan on windows to install modules which aren't pure perl. Once this has been done try installing from cpan again.

Re: Can't install CPAN modules on XP
by biohisham (Priest) on Jul 01, 2010 at 14:48 UTC
    On downloading modules for ActiveState Perl you have the easiest way to go with the PPM (Perl Package Manager), that comes with your default installation of ActivePerl just like cpan (UPDATED)...Using PPM is the most direct forward, however, there are times when automating modules installation and compilation is not possible due to factors like network restrictions or unavailability . So you gotta resort to manual downloading of the module and compiling it afterwards.

    You'd require a make utility in your case in here and there are many flavors out there on the Windows side:

    But before that do your homework and read through Installing Modules, this is one skill you'd much need down the line and you better sharpen it now before later.

    After getting one of these utilities and figuring it out you can just download any zipped Perl module from the Comprehensive Perl Archive Network, extract it to the Perl bin and run the make utility steps on it directly without having to invoke the shells for CPAN nor ppm neither.

    Have a Happy Perl coding journey and welcome to the Monastery....


    Excellence is an Endeavor of Persistence. A Year-Old Monk :D .

      cpan also comes with the a default installation ActiveState perl.

        Isn't that the cpan shell that I was trying to use in the first place? Anyway, PPM worked so I'm happy for the moment.
      ppm install dmake MinGW ppm upgrade dmake MinGW
      Thank you for that detailed answer. For now, PPM (which I didn't know about before this thread) works fine.
        If you ever had to add repositories for PPM to connect to and install packages from repositories other than the 'ActiveState Package Repository', check PPM performs uneeded checks for basic management of such connectivities.

        PPM can be invoked in two interfaces, the GUI one and the shell one, here are the commands

        C:\> ppm-shell <----- The shell terminal C:\> ppm <----- The GUI Terminal
        Knowing how to install modules through different ways via cpan, ppm or directly by unzipping packages to your bin directory is an essential capability you need to build on...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://847523]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found