How do I install a Perl Module?

by on April 3, 2006 · 3 comments· LAST UPDATED May 4, 2007

in , ,

Q. How do I install a Perl module under Linux or UNIX like operating system?

A. Perl modules (a Perl module is a discrete component of software for the Perl programming language) can be installed using various methods under different Linux distributions.

Task: Install perl module

If you are using Red Hat Linux then use up2date command to install most common modules:

# up2date module-name
Use following command to list all supported modules:
# up2date --showall | grep -i 'perl'
OR use yum command under CentOS/RHEL 5/Fedora core:
# yum list available 'perl'

If you are using Debian Linux, try to use apt-get command to install common perl module. However following is the recommended way to install a perl module.

A) Start CPAN Shell:
# perl -MCPAN -e shell

B) Install a perl module:
At cpan> shell prompt install module using install module::Name command. For example install module called MIME::Lite:
# cpan> install MIME::Lite
Alternatively, try out the following command:
# cpan -i MIME::Lite

See also:

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 3 comments… read them below or add one }

1 Geo Varghese December 5, 2009 at 4:10 pm

Try Perl Module Manager

To Install perl modules and all dependent modules,Uninstall perl modules,List all perl modules in system,Search for a perl module in and system,List all files of a perl module and Details of a perl module.

Download it from

It will help you.


2 chiranjeevi November 26, 2010 at 10:10 am

can any one help me to istall perl “MIME lite” install and use?


3 Marek January 3, 2012 at 9:48 pm

Hi chiranjeevi

For IIS Windows servers you probably need to have compiler “nmake.exe” 64bit version.
If you are running plesk you will find a copy on C:\plesk \…..\…\.\nmake.exe
copy this file to C:\Windows. If the “nmake.exe” is not there simply use search on drive C:\ and you may be lucky to find it somewhere, as other people suggest download and install MS Visual Studio, the nmake.exe will be there so search for it.

Then you can use CPAN and it will download compile and install MIME lite for you. To do this use command prompt:
perl -MCPAN -e shell [ENTER]
cpan> install MIME::Lite [ENTER]
there will be few dependancies to install as well, for these few questions the default answer is set to “yes” so all you need to do is click [ENTER] few times
and you are done.
cpan> exit [ENTER]
close command prompt window.


Leave a Comment

Tagged as:

Previous Faq:

Next Faq: