As you've learned, upgrading a Perl installed in any way other than a source build by using a source build will result in pain and suffering. You'll also find out that if you uninstall Perl via yum that it will take half the system with it (including X). So here's my recommendation:

First use rpm -e --nodeps when removing Perl. This will remove the now-damaged Perl without breaking the rest of your system.

Immediately reinstall the base system's Perl pachage, even if it's 5.10 or even 5.8.

In the /usr/lib/perl5 directory, you can remove any 5.x directories that don't match the Perl you just reinstalled, along with anything in /usr/lib/perl5/site_perl that doesn't match your current Perl version.

You can now kill off any other Perl builds you did (in /opt, /usr/local, etc.). Anything that isn't an already-existing path under RH can be removed wholesale (I believe /opt/local falls under that heading); anything that was there before will require careful surgery. The /usr/local one will probably be the most trouble, as there'll be a bunch of scripts installed allong with Perl that end up in /usr/local/bin.

Your best bet after the system Perl is restored and you've built a new one elsewhere is to check the new bin directory and clean out anything that's in there that's also in /usr/local/bin. /usr/local/lib can be handled like the /usr/lib example above, except that any version of Perl you spot in there can go. You may at this point have some leftovers, but they shouldn't cause you any problems.

I highly recommend that you simply ignore the system Perl altogether and do everything via the one you install. Use CPAN with that one to install modules. If for any reason you simply must diddle with the system Perl, only use yum and RPMs; do not use CPAN there, as it will confuse things when it comes to trying to install stuff via RPM. The cpanspec package is useful if you decide that you have loads of time to waste and you want to build your own RPM-based packages (I don't recommend this, if you can't guess!).


In reply to Re: Installing/Upgrading 5.8.8 to 5.12.1 by pemungkah
in thread Installing/Upgrading 5.8.8 to 5.12.1 by snidley

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.