How To Resolve – CPAN.pm needs tar, gzip and bzip2 installed – error message

by Ramesh Natarajan on December 4, 2008

[CPAN Logo]Issue: You have tar, gzip and bzip2 working properly on your server. However, you are getting “CPAN.pm needs either the external programs tar, gzip and bzip2 installed. Can’t continue.” error message while installing a perl module using cpan. This article explains how to solve this problem.
 
Also, please refer to our previous article on How To Install Perl Modules using manual and cpan method.

Solution:

The error happens because CPAN is not aware of tar, bzip2 and gzip file location. Configure these locations as shown below.

# perl -MCPAN -eshell

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)

cpan[1]> o conf tar /bin/tar
tar  [/bin/tar]
Please use 'o conf commit' to make the config permanent!

cpan[2]> o conf bzip2 /bin/bzip2
bzip2 [/bin/bzip2]
Please use 'o conf commit' to make the config permanent!

cpan[3]> o conf gzip /bin/gzip
gzip   [/bin/gzip]
Please use 'o conf commit' to make the config permanent!

cpan[4]>  o conf commit
commit: wrote '/usr/lib/perl5/5.10.0/CPAN/Config.pm'

cpan[5]> quit
No history written (no histfile specified).
Lockfile removed.

Make sure to perform commit to save the configuration changes as shown above.

Download Free eBook - Linux 101 Hacks

Get free Unix tutorials, tips and tricks straight to your email in-box.

If you enjoyed this article, you might also like..

  1. How To Install Perl Modules Manually and Using CPAN command
  2. PPM Install Error: no suitable installation target found for package
  3. How To Fix – Google Gears google.gears.factory.create failed Error Message
  4. Howto resolve Algorithm negotiation failed issue on SSH
  5. Instruction Guide to Install PHP5 from Source on Linux
  

Vim 101 Hacks Book

Leave a Comment

Previous post:

Next post: