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

I was able to install modules on my NT station with no problems until last week. Now I get this message everytime I attempt to install a module:
PPM> install TermReadKey Install package 'TermReadKey?' (y/N): y Retrieving package 'TermReadKey'... Error installing package 'TermReadKey': Could not locate a PPD file fo +r package TermReadKey
I have tried several different modules with all my error messages the same... Could not locate a PPD file for package....

Replies are listed 'Best First'.
Re: Module Installs
by talexb (Chancellor) on Feb 28, 2002 at 15:14 UTC
    I also came across this problem. I settled on figuring out how to install Perl modules on the account I have at my web provider (good old pair). If a reinstall of ActiveState helps then I will go that route.

    Installing Perl modules when you're not root

    1. Get the archive from CPAN.
    2. Unpack the archive

      This is two steps: unzip (to go from Foo.tar.gz to Foo.tar), then untar into the lib directory in your current Perl installation.

    3. Build/install/unit test the module.

      This is a few steps too:

      1. perl Makefile.PL -- this builds Makefile for you.

        The problem I had in the past was that this points to the system's Perl installation, and that's no good for you if you're not root. The trick is you have to either edit the Makefile and change PREFIX to the name of the directory above lib to get the next steps to work.

        This is, of course :) obvious to well-seasoned Monks, but it's something I had to tinker with for a while before it worked -- I never came across instructions on how to install modules when you're not root.

        (Alternatively you can run perl Makefile.PL with the command line option PREFIX=[your Perl directory here]. I found out about that option later.)

      2. make -- This presumably does any compilation that's required.
      3. make install -- This presumably does any file copying that's required.
      4. make install -- This presumably does any further installation that's required.
      5. make clean -- This presumably does any cleanup that's required.

    4. Even after that's all done, your work is not over. When I untarred Spreadsheet-ParseExcel-0.2405 it went into a directory called Spreadsheet-ParseExcel-0.2405 but in my code I was asking for the module Spreadsheet::ParseExcel which failed, of course.

      I renamed the directory Spreadsheet-ParseExcel-0.2405 to Spreadsheet and I was able to use the module.

      (Of course, after that I ran into run-time memory problems, but that's another story.)

    I hope this information is useful to any other Monks that want to install modules on a machine where they're not root -- or even if they are root, but don't want to install something system-wide.

    ps This node written Thursday 1015 February 28; please allow a few days for this information to mature before rushing ahead and using it .. no doubt there will be clarifications and corrections.

    Update 0830 Monday March 4: Thx to crazyinsomniac for also pointing out the CPAN module CPAN.pm which provides you with an automated way to get modules. Appropriate links are CPAN module page on CPAN and local CPAN manpage.

    I was aware of this but wanted to know about the nuts and bolts of the proper method .. but I will probably use CPAN the next time.

    --t. alex

    "There was supposed to be an earth-shattering kaboom!" --Marvin the Martian

Re: Module Installs
by strat (Canon) on Feb 28, 2002 at 14:51 UTC
    I think that the Module Term::Readkey comes already installed with perl...
    If this message comes, either the modulename is not spelled correctly, the connection into internet is not configured correctly this package is not indended for your operating system.
    You can try to download the Module in zip-Form from www.activestate.com, unpack them to a temp directory, change into that directory, look for a file with the extension *.ppd and enter
    ppm install xxx.ppd
    where xxx.ppd is the complete name of the ppd-File. Then there might come a better error-Message.

    If this module is not intended for your OS, then you could try to get the module from CPAN and pray that you are able to install it.

    Best regards,
    perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

Re: Module Installs
by Ido (Hermit) on Feb 28, 2002 at 14:44 UTC
    Happened to me a few days ago too.. PPM forgot everything. I couldn't even remove installed packages and query * returned nothing. I didn't find any solution(And I was in a hurry to install some package, so I didn't try too long), so I removed and reinstalled ActivePerl.
      I tried reinstalling ActivePerl and still get same message when trying to install a module. Anyone ever run into this before???
        Now I am trying to download from CPAN. I just downloaded it to the Perl directory. Now do I unzip it and then what?
Re: Module Installs
by gav^ (Curate) on Feb 28, 2002 at 15:24 UTC
    Something definatly seems broken in build 631. Using ppm3:
    ppm> install Data-Dumper Error: PPD for 'R:/inetpub/wwwroot/www2.activestate.com/PPMPackages/5. +6lus/Data-Dumper.ppd' could not be found.
    Using ppm, it can't find Data::Dumper at all. This is a bit frustrating as it makes installing XS modules a bit tricky. I tried a couple of pure perl modules, HTML::Template and Mail::Sendmail and they installed OK.

    I then had the cunning idea to try to see if ppm3 would install a pure perl module and it tries to install HTML::Template::Expr when you choose HTML::Template and then fails as it isn't in that location on the R:\ drive.

    I'm going to go send this off to Activestate as a bug and see if I can find an older version to install.

    gav^

(crazyinsomniac) Re: Module Installs
by crazyinsomniac (Prior) on Mar 01, 2002 at 04:20 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.