I have an instance where I have needed to build my own perl. The existing perl installed by apt-get (sarge) resides in /usr/bin, and is 5.8.4. The perl I have built is 5.8.7, and I took the defaults and installed this to /usr/local/bin (libraries to /usr/local/lib/perl5 etc.)

My new perl comes first in the path, and that is the one that I want to use for everything. CPAN installs work fine, as do CPANPLUS. My problem is that I have installed some more distributions with apt-get, which have perl bindings. These have gone into /usr/lib/ and are only visible from 5.8.4.

I know I can repoint PERL5LIB to add the lib paths, but I am looking for a more permanent solution.

Should I rebuild my perl with different config options, to give me an @INC with the other lib directories included?

Should I install my perl over the top of the one in /usr/bin and /usr/lib? (this seems more risky to me)

What's the best way of dealing with this?

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)


In reply to A problem with two perls on a Debian system by rinceWind

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.