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.
Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.Get the Linux Sysadmin Course Now!
If you enjoyed this article, you might also like..
|
|
|
|






My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web. My focus is to write articles that will either teach you or help you resolve a problem. Read more about