{"id":16,"date":"2008-04-28T00:41:05","date_gmt":"2008-04-28T05:41:05","guid":{"rendered":"http:\/\/themayesfamily.com\/blogs\/b\/?p=12"},"modified":"2008-04-28T00:41:05","modified_gmt":"2008-04-28T05:41:05","slug":"installing-perl-modules-on-1and1","status":"publish","type":"post","link":"https:\/\/themayesfamily.com\/blogs\/b\/2008\/04\/28\/installing-perl-modules-on-1and1\/","title":{"rendered":"Installing Perl Modules on 1and1"},"content":{"rendered":"<p>I was trying to figure out how to install perl modules on my hosting provider <a href=\"http:\/\/1and1.com\">1and1.com<\/a>.  I was doing an old school install where I was unpacking and making the modules myself.  Yep&#8230; as usual there was a better way.  Yes, I&#8217;m a bonehead but since I need a scapegoat I&#8217;m blaming it on the Yahoo dev environment. It&#8217;s made me soft and I needed to figure out the right way to do this.<\/p>\n<p>\nThat said, cpan.pm comes with most standard perl installs and totally makes installing modules easier.  It handles dependencies, downloads, unpacking, etc.  All I really had to do was configure the env.  This seemed to be the one snag that wasn&#8217;t well documented.  I was getting something like the following error when running $&nbsp;perl -MCPAN -e shell:<\/p>\n<p>\n<font color=\"#6600cc\"> Your configuration suggests &#8220;\/root\/.cpan&#8221; as your CPAN.pm working directory. I could not create this directory due to this error: mkdir \/root\/.cpan: Permission denied at \/usr\/lib\/perl5\/5.6.1\/CPAN.pm line 499<br \/>\nPlease make sure the directory exists and is writable.<\/font><\/p>\n<p>The solution was found here:<br \/>\n&nbsp;&nbsp;http:\/\/www.dcc.fc.up.pt\/~pbrandao\/aulas\/0203\/AR\/modules_inst_cpan.html<\/p>\n<p>\nThe site describes the following steps which I modified to work for me:<\/p>\n<blockquote>\n<ol>\n<li>Create a directory for the perl modules in your HOME<br \/>\n      <font color=\"#6600cc\">      $&nbsp;mkdir ~\/perl5lib<\/font>\n<\/li>\n<li>Create ~\/.cpan and ~\/.cpan\/CPAN directories:<br \/>\n     <font color=\"#6600cc\"> mkdir ~\/.cpan<br \/>  mkdir ~\/.cpan\/CPAN<br \/><\/font><\/p>\n<\/li>\n<li>Create a Config.pm for the CPAN module with <code>$CPAN::Config<\/code> empty<br \/>\n      <font color=\"#6600cc\">$ echo &#8220;$CPAN::Config = {}&#8221;&gt; ~\/.cpan\/CPAN\/MyConfig.pm<\/font>\n    <\/li>\n<li>Execute again:<br \/>\n      <font color=\"#6600cc\">     $ perl -MCPAN -e shell<\/font><br \/>\nThis time (if all goes well) it will prompt you for the empty fields in <code>$CPAN::Config<\/code>.<\/p>\n<\/li>\n<\/ol>\n<\/blockquote>\n<p>Here&#8217;s where I modified things:<\/p>\n<ol>\n<li>Exit the cpan interactive shell<\/li>\n<li>Pick a directory where you want to keep your local copy of perl modules.  I chose: ~\/perl as the prefix.<\/li>\n<li>Create the directory there and make sure you have permissions to write.<\/li>\n<li>Start the cpan interactive shell again using $&nbsp;perl -MCPAN -e shell<\/li>\n<li>You need to re-configure the conf to point at your new directory.<\/li>\n<li>o conf makepl_arg &#8220;LIB=~\/perl\/lib <br \/>\n                    INSTALLMAN1DIR=~\/perl\/man\/man1 <br \/>\n                    INSTALLMAN3DIR=~\/perl\/man\/man3&#8243;<\/li>\n<li>o conf commit ( this will make the changes permanent )<\/li>\n<li>exit the cpan interactive shell again and modify your env vars to point at the new locations<\/li>\n<li>export PERL5LIB=${PERL5LIB}:~\/perl\/lib (If you want this to be permanent then modify your ~\/.bashrc)<\/li>\n<li>restart the cpan interactive shell and you&#8217;re set to start installing<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to figure out how to install perl modules on my hosting provider 1and1.com. I was doing an old school install where I was unpacking and making the modules myself. Yep&#8230; as usual there was a better way. Yes, I&#8217;m a bonehead but since I need a scapegoat I&#8217;m blaming it on the &hellip; <a href=\"https:\/\/themayesfamily.com\/blogs\/b\/2008\/04\/28\/installing-perl-modules-on-1and1\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing Perl Modules on 1and1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[13,14,37,38,49],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-programming","tag-13","tag-1and1","tag-perl","tag-perl-modules","tag-shared-hosting"],"_links":{"self":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":0,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themayesfamily.com\/blogs\/b\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}