Easily installing Perl modules with Yum

Although many Perl modules are available through Red Hat and CentOS’s repositories, the name the modules have in the repository differ from the name of the module itself.

To use yum to install a Perl module using the module name, just place ‘”perl()”‘ around the name of the module (double quotes included) when giving it as an argument to yum. For example, to install the ‘Net::Telnet’ module, you would run ‘yum install “perl(Net::Telnet)”‘.

Alternatively, to construct the correct package name, you would prepend the module’s name with ‘perl-’, and change all of the instances of ‘::’ to ‘-’. For example, the package for the ‘Net::Telnet’ module would be ‘perl-Net-Telnet’.

2 thoughts on “Easily installing Perl modules with Yum”

    1. But it *does* work with `yum whatprovides`, at least when I tested it just now on an Amazon Linux system.

Leave a Reply

Your email address will not be published. Required fields are marked *