Depending on whether you’re using openSUSE, SUSE Linux Enterprise Desktop, SUSE Linux Enterprise Server or Open Enterprise Server and which version you’re using you may be lucky and find that you can easily add the required Perl module via YaST.

Here packages are named perl-<module> where double colons (::) are replaced by a minus (-) so for example the Net::SNMP module can be added by installing the perl-Net-SNMP package.

However the majority of Perl modules are not available through YaST so have to be added another way. Fortunately Perl on Linux provides a way of automating the manual process.

As root run

# perl -MCPAN -e 'shell'

If it’s the first time this has been done you need to answer some questions – you can either choose to autoconfigure these or run through manually and choose defaults. If you get prompted for a CPAN mirror URL use something suitable from http://search.cpan.org/mirror

Once done you can then install the additional modules – case is important!

For example, to install the Net::SMTP module do

cpan[#]> install Net::SMTP

at the end of which, if this is the first time using the shell, it will probably note that there’s a newer CPAN so then

cpan[#]> install CPAN

which may take a while!

Afterwards it will prompt you to reload CPAN so

cpan[#]> reload CPAN

To exit

cpan[#]> quit

(Visited 1 times, 1 visits today)
Tags:
Category: Enterprise Linux, SUSE Linux Enterprise Server, Technical Solutions
This entry was posted Tuesday, 10 November, 2009 at 1:18 pm
You can follow any responses to this entry via RSS.

Leave a Reply

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

No comments yet