http://www.perlmonks.org?node_id=1144161
imho has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone,

I am on a Linux machine with Busybox where gzip is a symlinked command to Busybox, and not the full gzip utility. Perl-cpan fails to unpack CPAN modules saying:
Giving up parsing your /home/nemo/.cpan/sources/modules/02packages.det +ails.txt.gz, too many errors/usr/bin/gzip: invalid option -- 'q' BusyBox v1.21.1 (2015-08-24 08:58:18 UTC) multi-call binary. Usage: gzip [-cfd] [FILE]... Compress FILEs (or stdin) -d Decompress -c Write to stdout -f Force /usr/bin/gzip: invalid option -- 'q'

How can I solve this problem? How can I fix my cpan installation?

Best regards
imho

Replies are listed 'Best First'.
Re: CPAN won't work with Busybox gzip
by Corion (Pope) on Oct 08, 2015 at 12:57 UTC

    It's not really your CPAN installation but your incompatible gzip executable that you need to fix.

    Looking through CPAN::Tarzip (which handles reading from a .gz file for CPAN), there is the following line:

    $success = 0==system(qq{$command -qdt "$read"});

    Maybe you can "fix" things by removing the "q" from that line. Alternatively, maybe you can simply decompress the .gz file manually and the need for gzip might be removed that way.

      Hi,

      thank you very much for the hint. It works perfectly after removing the "q" from Tarzip. :-)

      Best regards
      imho