Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

CPAN won't work with Busybox gzip

by imho (Initiate)
on Oct 08, 2015 at 08:46 UTC ( #1144161=perlquestion: print w/replies, xml ) Need Help??
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

Replies are listed 'Best First'.
Re: CPAN won't work with Busybox gzip
by Corion (Pope) on Oct 08, 2015 at 08: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.


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

      Best regards

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1144161]
Approved by toolic
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2018-11-16 12:10 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (194 votes). Check out past polls.

    • (Sep 10, 2018 at 18:53 UTC) Welcome new users!