Depending on your setup but these may work.

1)su -; then set up paths etc and do the whole process as root. You may need to fiddle with the build directories initially.

2)sudo make install; it's only this last stage that needs the special permissions. However some modules seem to also do some other tasks here that may fail.

3)Change the permissions on the perl lihrary directories. I've done this, putting my self in a perladmin group and making that group own /usr/local/lib/perl5 (or where ever on your system).

4)I think that CPANPLUS has the option to sudo for the make install phase, so install that and configure appropriately.

Some of these are inherinantly less safe than others, use what is best for you and your environment.


In reply to Re: Im struggling to use cpan to install modules by tweetiepooh
in thread Im struggling to use cpan to install modules by richill

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.