Installing Perl modules with "perl -MCPAN -e shell;" fails with "02packages.details.txt.gz does not contain a Line-Count header"

Gerrit P. Haase
Mon Feb 28 13:06:00 GMT 2005

Stephan Petersen wrote:

> Hi David,
>>> Please check the validity of the index file by comparing it to more
>>> than one CPAN mirror.
>> Have you tried this?  E.g. configured CPAN to use another mirror and 
>> tried
>> again?
> yes, it's the same for every CPAN mirror I've tried. I've deleted CPAN's
> and my .cpan directory several times now, it's the same after
> every reconfiguration.
> Testing 02packages.details.txt.gz with gzip -t reports:
> gzip: 02packages.details.txt.gz: invalid compressed data--format violated
> Same with
> I'm using cygwin on W2k with default text file type "DOS", in case
> that's relevant.

Yes.  Your .cpan directory needs to be mounted in binmode (Unix).

 From /usr/share/doc/Cygwin/perl-5.8.6.README:

- The CPAN repository and build directory *must* reside in a path
   mounted in binmode:

     mount -s -b -f c:/cygwin/home/username/.cpan /home/username/.cpan
     mount -u -b -f c:/cygwin/home/username/.cpan /home/username/.cpan

   where username is your home path and cygwin / windows username.
   After mounting like this it should work with only few warnings or
   completely without problems, depending on your environment settings
   for the CYGWIN variable.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list