Fellow Monasterians:

Debian is great for installing CPAN modules when there is an existing package...bada-bing

But rolling one with dh-make-perl can have its moments. I was told never to run it as root (CPAN can apparently do unpredictable things), but all I get is errors if I don't:

dh-make-perl --build --cpan String-Random-0.22 <snip> mv: cannot move `/home/bradc/.cpan/build/String-Random-0.22' to `//Str +ing-Random-0.22': Permission denied Cannot open //String-Random-0.22/Makefile.PL: No such file or director +y

So I bend to the pressure and run it as sudo. I have successfully built a few, but more often than not I get:

# Add commands to compile the package here /usr/bin/perl Build.PL installdirs=vendor Can't locate Module/Build.pm in @INC (@INC contains: /etc/perl /usr/lo +cal/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/sh +are/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_p +erl .) at Build.PL line 3. BEGIN failed--compilation aborted at Build.PL line 3. make: *** [build-stamp] Error 2 make: Leaving directory `/String-Random-0.22' Cannot create deb package

It's usually Can't locate Module/Build.pm that does me in. So, I looked in </code>/Module</code> and not surprisingly, no Build.pm:

$ /usr/share/perl5/Module$ ls drwxr-xr-x 2 root root 4096 2008-08-03 11:24 Depends -rw-r--r-- 1 root root 2576 2005-06-02 11:58 Depends.pm $ sudo find / -name Build.pm

Should the CPAN modules come with Build.pm or is that something I need to find and install? Thanks!

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

In reply to Issues installing CPAN modules on Debian (OT) by bradcathey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.