{"id":10328,"date":"2025-09-03T14:18:53","date_gmt":"2025-09-03T18:18:53","guid":{"rendered":"https:\/\/www.pair.com\/support\/kb\/?post_type=ht_kb&#038;p=10328"},"modified":"2025-09-03T14:22:56","modified_gmt":"2025-09-03T18:22:56","slug":"install-perl-modules-cpan","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/","title":{"rendered":"Installing Perl with CPAN"},"content":{"rendered":"\n<p>This article explains how to install Perl modules from CPAN (Comprehensive Perl Archive Network) in your home directory on Pair Networks servers. This is useful if you need a module that isn\u2019t already installed on your server or a specific version of an installed module.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prerequisites<\/strong><\/h2>\n\n\n\n<ul>\n<li>Access to your Pair Networks hosting account via SSH<\/li>\n\n\n\n<li>Basic knowledge of the command line<\/li>\n\n\n\n<li>A directory in your home folder to store the installed modules<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Installation Steps<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Open the CPAN Shell<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.pair.com\/support\/kb\/connecting-with-ssh\/\" target=\"_blank\" rel=\"noreferrer noopener\">Connect to your account via SSH<\/a> and then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/perl -MCPAN -e shell<\/code><\/pre>\n\n\n\n<p>You should see the CPAN shell prompt:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan shell -- CPAN exploration and modules installation (v1.7601)\n\n&nbsp;&nbsp;ReadLine support enabled\n\n&nbsp;cpan&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Configure CPAN to Use Your Home Directory<\/h3>\n\n\n\n<p>By default, CPAN installs modules in directories where you don't have write access. Configure CPAN to install to your home directory (where you do have write access) by running:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>o conf makepl_arg LIB=DIRECTORY_PATH<\/code><\/pre>\n\n\n\n<p>Replace <kbd>DIRECTORY_PATH<\/kbd> with the file path to your chosen directory.&nbsp;<\/p>\n\n\n\n<p>Example:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan&gt; o conf makepl_arg LIB=\/usr\/home\/MyUsername\/MyFolder\n\n&nbsp;&nbsp;makepl_arg LIB=\/usr\/home\/MyUsername\/MyFolder\ncpan&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Install a Perl Module<\/h3>\n\n\n\n<p>To install a module, use the <kbd>install<\/kbd> command inside the CPAN shell. For example, if you wanted to install the Acme::Yoda module:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan&gt; install Acme::Yoda<\/code><\/pre>\n\n\n\n<p>The installer will download and compile the module. You may see a lot of information, as well as warnings about man pages. This is normal and can be ignored. When the installation is successful, you will see:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/bin\/make install -- OK<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. Quit the CPAN Shell<\/h3>\n\n\n\n<p>When finished, enter the <kbd>q<\/kbd> command to exit:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan&gt; q<\/code><\/pre>\n\n\n\n<p>This will exit the CPAN shell.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Post-Installation: Using Your Module<\/h2>\n\n\n\n<p>Any Perl script that uses the installed module must be told where to find it. You can add a line like this to your script, pointing to the same directory you used in step 2.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>use lib '\/usr\/home\/USERNAME\/DIRECTORY_NAME';\n\nuse Acme::Yoda;<\/code><\/pre>\n\n\n\n<p>Replace <kbd>USERNAME<\/kbd>, <kbd>DIRECTORY_Name<\/kbd>, and <kbd>Acme::Yoda<\/kbd> with your username, directory name, and Perl module respectively.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p>Use the <kbd>help<\/kbd> command in CPAN shell for additional options:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan&gt; help<\/code><\/pre>\n\n\n\n<p>You can also view the full documentation by running:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>perldoc CPAN<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Resources<\/h2>\n\n\n\n<ul>\n<li><a href=\"https:\/\/metacpan.org\/pod\/CPAN\">CPAN Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.perl.org\/docs.html\">Perl Documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to install Perl modules from CPAN (Comprehensive Perl Archive Network) in your home directory on Pair Networks servers. This is useful if you need a module that isn\u2019t already installed on your server or a specific version of an installed module.&nbsp; Prerequisites Installation Steps 1. Open&#8230;<\/p>\n","protected":false},"author":11,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[175],"ht-kb-tag":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Perl Modules with CPAN on Pair Networks<\/title>\n<meta name=\"description\" content=\"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Perl Modules with CPAN on Pair Networks\" \/>\n<meta property=\"og:description\" content=\"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - Pair Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pairnetworks\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-03T18:22:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@pairNetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/\",\"name\":\"How to Install Perl Modules with CPAN on Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2025-09-03T18:18:53+00:00\",\"dateModified\":\"2025-09-03T18:22:56+00:00\",\"description\":\"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Perl with CPAN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"name\":\"Knowledge Base - Pair Networks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\",\"name\":\"Pair Networks\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"width\":360,\"height\":360,\"caption\":\"Pair Networks\"},\"image\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pairnetworks\/\",\"https:\/\/twitter.com\/pairNetworks\",\"https:\/\/www.instagram.com\/pairnetworks\/\",\"https:\/\/www.linkedin.com\/company\/2269676\/\",\"https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/\",\"https:\/\/www.youtube.com\/user\/pairnetworks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Perl Modules with CPAN on Pair Networks","description":"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Perl Modules with CPAN on Pair Networks","og_description":"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.","og_url":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2025-09-03T18:22:56+00:00","twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/","url":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/","name":"How to Install Perl Modules with CPAN on Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2025-09-03T18:18:53+00:00","dateModified":"2025-09-03T18:22:56+00:00","description":"Install Perl modules with CPAN on Pair Networks. Step-by-step guide to configure, install, and use modules in your home directory.","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/install-perl-modules-cpan\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"Installing Perl with CPAN"}]},{"@type":"WebSite","@id":"https:\/\/www.pair.com\/support\/kb\/#website","url":"https:\/\/www.pair.com\/support\/kb\/","name":"Knowledge Base - Pair Networks","description":"","publisher":{"@id":"https:\/\/www.pair.com\/support\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pair.com\/support\/kb\/#organization","name":"Pair Networks","url":"https:\/\/www.pair.com\/support\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","contentUrl":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","width":360,"height":360,"caption":"Pair Networks"},"image":{"@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pairnetworks\/","https:\/\/twitter.com\/pairNetworks","https:\/\/www.instagram.com\/pairnetworks\/","https:\/\/www.linkedin.com\/company\/2269676\/","https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/","https:\/\/www.youtube.com\/user\/pairnetworks"]}]}},"_links":{"self":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/10328"}],"collection":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=10328"}],"version-history":[{"count":3,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/10328\/revisions"}],"predecessor-version":[{"id":10331,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/10328\/revisions\/10331"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=10328"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=10328"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=10328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}