Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Uninstalling / installing perl

by sirsir (Initiate)
on Jun 20, 2008 at 09:35 UTC ( [id://693099]=perlquestion: print w/replies, xml ) Need Help??

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

The perl install I had on my new sabayon install didn't support threads. So I downloaded perl 5.8.8 and rm -rf /usr/lib/perl5/ and /usr/bin/perl . And now i'm thinking this isn't the way. I have now ./Configure'd the perl 5.8.8 I just downloaded like 10 times and it can't find Config.pm, so I can't run CPAN or PPM. Can someone show me a guide to properly uninstalling perl then reinstalling?

Replies are listed 'Best First'.
Re: Uninstalling / installing perl
by Corion (Patriarch) on Jun 20, 2008 at 09:42 UTC

    Basically, never remove the system Perl. You did just that, and most likely now many administrative tools of your system are broken. Your best approach is to restore the old Perl from backup and to ask your system administrator for the best way of how to proceed.

    You can easily have multiple versions of Perl on your system, and this is the approach I recommend. Use the vendor-supplied version of Perl but only install the vendor-supplied modules and only through the vendor-supplied mechanism of installing/upgrading (for example, rpm or apt-get). For your own version of Perl, use cpan. Compiling and installing your own version of Perl is described in the INSTALL file that comes with your Perl distribution. You should configure your own Perl to use /opt/perl/ or ~sirsir/perl/ as the prefix directory though as not to clobber your system perl:

    sh Configure -Dprefix=/opt/perl make make test make install

    We cannot help you further if you keep the error messages you encounter to yourself.

Re: Uninstalling / installing perl
by marto (Cardinal) on Jun 20, 2008 at 09:44 UTC
    Hi sirsir,

    Rather than remove the version of Perl that ships with an OS, I would have installed a new version of Perl (or perhaps not new, but with different configuration options) to a different path. Did you make after you ran ./configure? Did you read the INSTALL file?

    Martin
      I don't want multiple versions of perl on my system. I only want one. I don't have a system administrator, it's my computer, and I didn't think the Configure that was with it was the same as the usual 'configure;make;make install'.

        Believe me - you do not want "only one version of Perl".

        Your system vendor supplies one version of Perl with the system. This version of Perl is what your system utilities use. Replacing that version of Perl with another version of Perl not supplied by your vendor will break your system.

        Either you use whatever Perl your system vendor supplies you, or you create your own Perl, preferrably below /opt/perl.

        If you don't believe me on how to configure and install your own Perl, I already pointed you to a more authoritative source than I am, the install instructions that come with the Perl source distribution. Of course, you are free to ignore both, my advice and the advice in the official documentation.

        I don't want multiple versions of perl on my system.

        Ok ... that's your call. But the perl that came with the operating system is *needed* by the operating system, so be careful what you do with it. OTOH, if you install a perl into (say) /usr/local you can do pretty much whatever you want with it and not have to worry about breaking the OS.

        Cheers,
        Rob
        Hi sirsir,

        My advice was based on the fact that your OS may have dependancies on the version of Perl that it is installed as part of the OS distribution. Changing this version of Perl may result in some system tools failing to work properly.

        However I was not trying to tell you what to do, after all it is your system, you can obviously do with it what you wish. I was simply trying to point out a potential problem that may occur based on your course of action.

        Did the make install throw any errors/warnings? Out of interest, what does perl -V show.

        Martin

        Seeing as you're on Sabayon, a derivitive of Gentoo (which is on four of my four linux boxes here), all you actually needed to do is change your USE flag, and re-"emerge perl". (I had to do this to switch out threads to get apache and perl playing nice when I first moved to Gentoo back in 2005.) You may still be able to do that even now, since most of the package system is in python, though I'm not sure.

        If that doesn't work, perhaps someone can give you a binary package of their perl5.8.8 (are you running x86, x86_64, or other?) which you may be able to install that will work well enough for you to re-emerge it with the USE flags you really want. If you need that, perhaps one of my Gentoo boxes would work for that, and I can send you that somehow (that'd be co-ordinated over /msg's, not nodes).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://693099]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-18 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found