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

Hello Monks, I working on regexps which manipulate HTML, and would like to try out the code within the regexp modules in CPAN. Howeverm, I have a problem. When I attempt download the package (are they packages, as the download seems to contain quite a few modules?) from CPAN, the following errors appear:
Error reading header after processing 0 entries. WinZip Wizard cannot open this fiule; it does not appear to be a valid archive. If you downloaded this file, try downloading it again. If you want to add the file to an archive, first create or open an the archive, then drop the file again.
What does this mean, and how may I solve this prob as I'm not sure how?

Replies are listed 'Best First'.
Re: CPAN module download probs...
by zakzebrowski (Curate) on Aug 27, 2003 at 11:34 UTC
    Well, it means a couple of things could have happened...
    • The archive is invalid because it was downloaded incorrectly. (Eg. you did not download the whole archive, try again.)
    • Sometimes, tar.gz files are not opened correctly with winzip. Try downloading and installing cygwin and then do a tar -zxvf on the file and see if you can install it. (Also, cygwin itself has a copy of perl available, which you can select for download under the 'interpeter' section of the setup window...)
    • Are you using Activestate perl? Why not use the native ppm interface? (Do a perldoc ppm from the command line or you can browse the documentation.)
    Good luck. :)
    Zak

    ----
    Zak
Re: CPAN module download probs...
by aquarium (Curate) on Aug 27, 2003 at 12:12 UTC
    i think you are using windows, no?
    when you download via Internet Explorer (even an ftp site looks just like a collection of links) you must save the xxmodule.tar.gz as type ANY not the defaulted type WINZIP. you may also have to fix the filename before pressing save, as windows might have changed xxmodule.tar.gz to xxmodule.tar.tar
    anyways....modules that come from CPAN are useless to you on a windows platform unless you have a properly configured C compiler and make utility as well.
    if you're using activestate's perl, depending upon which version, there's ppm (perl 5.0X) and ppm3 (perl 5.6 and 5.8). ppm stands for Perl Package Manager, and is a totally different format of storing modules for activestate perl only (which is 99% of all perl installations on windows.) these packages are pre-compiled for windows platform. activestate maintains repositories of these pre-compiled modules, and some perl monks create and even keep online their own repositories. check your ppm documentation on how to use it.
      Cheers for the help, folks. I use mozilla, so maybe that's part of the problem. I use perl 5.8 from Activestate. And i do use windows, yes. Regarding the windows platform issue...havent a clue how to get the CPAN modules to work through a C compiler (excuse my ignorance, please). I'll get back to you folks on this matter, see how far i get... T : )
Re: CPAN module download probs...
by RMGir (Prior) on Aug 27, 2003 at 11:40 UTC
    It sounds like you're downloading files via FTP, and you forgot to use "binary", but it's hard to tell.

    Try going to http://search.cpan.org, finding the module you want, and downloading it that way. Your web browser should "to the right thing".
    --
    Mike

Re: CPAN module download probs...
by barbie (Deacon) on Aug 28, 2003 at 09:04 UTC
    I suggest you have a read of the tutorial A Guide to Installing Modules. Both CPAN and PPM can be used on Windows and make life alot easier. Both will download, make, test and install the distributions for you. CPAN will also check for prerequisites and ask whether you want to install them too, which can save you time.

    In addition there is now CPANPLUS which extends the functionality and usage of CPAN if you wanted to look into that.

    --
    Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/