VDS Sphera Knowledge Base

Main / Browse Categories / Perl & CGI / How do I install Perl Modules using CPAN (Gnu Compiler Collection)?

Print article Print Article    Email article Email Article

How do I install Perl Modules using CPAN (Gnu Compiler Collection)?
WARNING: DO NOT USE MCPAN in shell mode. It tries to upgrade to the latest version of Perl and that will not work.

These commands will NOT work:

perl -MCPAN -e 'shell'
perl -MCPAN -e 'install CGI'
Instead, you will need to use this command:
perl -MCPAN -e 'get CGI'
If you get an error(s) similar to:
Warning: prerequisite Class::Container failed to load: 
Can't locate Class/Container.pm in @INC
You should get and install Class::Container first, along with any other pre-requesites it squawks about.
cd  /.cpan/build
perl Makefile.PL
make
make  install
A successful intallation will have something like the following near the last line of the make install output:
Appending installation info to 
/usr/local/perl/lib/5.6.0/i686-linux/perllocal.pod

User Comments
How do I install Perl Modules using CPAN (Gnu Compiler Collection)?  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 How can I run Perl scripts outside of the cgi-bin directory?
 Where is Perl located on the server?
 Where is the default cgi-bin in my VDS?
 My Perl or CGI scripts are not working, what can I do?
 How can I avoid being asked to upgrade Perl every time I install a Perl Module?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »