How to check and install missing perl modules

  • Check if module is installed. Errors mean missing module.

    # perl -MModule::Name -e 1
    
  • See documentation of the module if installed.
    # perldoc Module::Name
    
  • Open CPAN shell
    # perl -MCPAN -e shell
    
  • To reconfigure the shell if needed.
    cpan>o conf init
    
  • Install an available module.
    cpan> install HTML::Template
  • You can run the Perl CPAN module via command line perl and get it installed in a single line:

# perl -MCPAN -e ‘install HTML::Template

  • Force install if test fails.
    cpan> force install Module::Name
    
  • To manual install perl modules. Unzip and go to module directory.

# tar -zxvf HTML-Template-2.8.tar.gz

  • # perl Makefile.PL
    # make
    # make test
    # make install
    

Leave a Comment

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

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top