Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm attempting to upgrade the version of Perl on a Redhat machine from an RPM. When I try to install it, I get the following:
file /usr/bin/perl from install of SiePerl-5.8.0-bin-1.0-Linux2.2.14.I +NSTALL.i386-1.0-1 conflicts with file from package perl-5.00503-12
I tried simply mving the perl executable to perl_old, but got the same result.

Am I going to have to uninstall the older version somehow? If so, how do I do it when it wasn't installed as an RPM?

Many thanks in advance,
Rear Admiral Rosco Von Schicklegruber

Replies are listed 'Best First'.
Re: Conflict while installing Perl
by Lhamo Latso (Scribe) on Mar 30, 2003 at 04:10 UTC

    I would also uninstall the rpm version, but you certainly can keep the older Perl and install a new version next to it. You will need to know where the Perl library tree is located.

    perl -e "print @INC;"

    will list off uncerimoniously where the library is. Perl will normally install it's libraries in /usr/local/lib/perl5, unless you use -Dprefix= during configuration. The rpm version of Perl on my ISP uses -Dprefix=/usr and lands in /usr/lib/perl5.

    For installing Perl 5.8.0, after the necessary download, gunzip,and "tar xvf" commands :

    1. sh Configure -de -Dusethreads (-Dprefix=/usr maybe)
    2. make
    3. make test
    4. make install (as root)
    5. installman

    After it's all done, you may see some 5.6.1 or other older version directories embeded next to 5.8.0 in the Perl tree. These can be removed at some later date, but be careful to keep a tar/gzip copy around in case somebody is linking into this part of the tree (like maybe a static apache module).

    Good Luck!

    Update

    The location of the executable, "which perl" shows where it is, may need some adjustments in the name. The installation creates a file called perl5.8.0, but it would be better to name it simply perl. The previous Perl executable will have this name and take precedence until it get replaced. Use "perl -v" to check the version.

Re: Conflict while installing Perl
by jasonk (Parson) on Mar 30, 2003 at 04:18 UTC
    Am I going to have to uninstall the older version somehow?

    Yes, you can't install them both at the same time because they both contain many of the same files.

    If so, how do I do it when it wasn't installed as an RPM?

    It was, if it wasn't you wouldn't be getting this error. The error is telling you that the package you are trying to install (SiePerl) and a package you already have installed (perl) both contain the file /usr/bin/perl.


    We're not surrounded, we're in a target-rich environment!
Re: Conflict while installing Perl
by lacertus (Monk) on Mar 30, 2003 at 03:15 UTC
    Can't speak very confidently in regards to using rpm commands, as I've been using source based distro's for some time now; however, I would strongly recommend you simply completely removing your current, RH distributed version of Perl. This would be accomplished by executing: rpm -rvh perl I blieve, though you should look at the man for specifics. Your should then download Perl 5.8.0, and run ./configure, make, make install.

    The advantage to compiling your own version of Perl is that you are certain to get a completely vanialla version, free from any random RH mod's!

    UPDATE: I might also add that if you are updating an rpm package, you generally ( *I believe* ) should force the upgrade. Really, you should compile and install from source; if you can't do that, uninstall ( rpm -r ) the old package; if last but not least you don't want to do any of the previous, rpm -Ufv package.

    Hope this helps,
    Lacertus

    ------------------------------------
    "There is more in heaven and earth
    than is dreamt of in your philosophy"