• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

BASH> How to install perl modules through CPAN on Ubuntu

Oct26
2010
Written by Scott Rowley

Install all dependent packages for CPAN

sudo apt-get install build-essential

Invoke the cpan command as a normal user

cpan

Once you hit on enter for “cpan” to execute, you be asked of some few questions. To make it simple for yourself, answer “no” for the first question so that the latter ones will be done for you automatically.

Enter the commands below

make install
install Bundle::CPAN

Now all is set and you can install any perl module you want. examples of what installed below:

cpan prompt> install IO::File
cpan prompt> install Net::SMTP_auth
cpan prompt> install Email::MIME::Attachment::Stripper
cpan prompt> install Mail::POP3Client
Posted in BASH - Tagged BASH, cpan, install, module, Perl
« Emacs> Remove welcome screen/splash from emacs
» Emacs> Use % to jump to the matching parenthesis/brackets

4 Comments

  1. Lutz Heidbrink's Gravatar Lutz Heidbrink
    January 29, 2013 at 4:08 am

    Thank you so much for this artikel, just saved my life, with the nfsen configuration 🙂

    • Scott Rowley's Gravatar Scott Rowley
      January 29, 2013 at 9:16 pm

      Glad it helped! 😀

  2. Paul's Gravatar Paul
    February 26, 2013 at 11:07 am

    “Invoke the cpan command as a normal user”

    Are you sure? It seems that cpan wants to write to /usr/local/lib/perl/… so it definetly needs root (in my case)

  3. kulharia's Gravatar kulharia
    July 22, 2014 at 9:35 pm

    Thanks. The directions were very useful

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top