Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: unintstall and Install Perl linux

by zentara (Archbishop)
on Jul 21, 2018 at 11:20 UTC ( [id://1219001]=note: print w/replies, xml ) Need Help??


in reply to unintstall and Install Perl linux

You have received good advice from the experts above, but now I will add that yes, you can just rip out the OS-installed Perl and reinstall your own from scratch. I do this all the time with my favorite OS Slackware, however, I would hesitate on a complicated OS like Ubuntu, where the package manager will force you to download various compiled perl modules, which are used in support of other programs. It's the compiled perl modules, ( those with a .so suffix that will cause you problems). If you do rip out your original Perl, be aware that you may have to install many modules which your OS system needs, and you will have to be careful about letting your package manager automatically install Perl updates, and support files, because it MAY install modules incompatible with your new Perl.

To be specific, in my instance, Slackware comes with a non-thread enabled Perl, and I want threads. So the first thing I do after an OS install, is use Slackware's package manager to uninstall Perl, then I compile my own from source, and spend a few hours installing the modules I want. You can also get brutal and skip the package manager uninstall completely, by manually deleting the installed Perl and it's lib. The nice thing about Perl is that all it's modules are nicely contained in one easy to delete directory, or copy in case of backup.

So, assuming you have perl in /usr/bin, you can delete the files (perl perl5.28.0 perlbug perldl perldoc perli11ndoc perlivp perlmine.pl perltetris.pl perltex) from /usr/bin, AND delete the entire module directory, say /usr/lib/perl5. Sometimes the module directory is elsewhere, like in /usr/lib64/perl5, or wherever your vendor decided to put it. You can find out where your @INC lib is by running "perl -V". You also may have to delete any shared perl lib, libperl.so, if your vendor perl was built as a shared perl, rather than as a static binary.

So, you can see, there are many things to consider, and following the advice from the other experts above, is usually the safest path. That is install your new personal perl alongside your vendor's perl, in a different directory. Usually the vendor perl is in /usr/bin and a personal perl will go in /usr/local/ OR your home directory, but its totally up to you where to put it.

I probably shouldn't have wrote this, but it is useful knowledge in case you want to backup your current perl, as the same files you would delete, are the same files to be saved as backup.

Also remember, if you F*** things up, your can always just use your package manager to reinstall the vendor's perl.


I'm not really a human, but I play one on earth. ..... an animated JAPH

Replies are listed 'Best First'.
Re^2: unintstall and Install Perl linux
by tobyink (Canon) on Jul 21, 2018 at 14:30 UTC

    "Also remember, if you F*** things up, your can always just use your package manager to reinstall the vendor's perl."

    Unless your package manager is partly written in Perl.

      Exactly :) In such cases we can only hope an appropriate backup was taken :)

Re^2: unintstall and Install Perl linux
by yaklichk0719 (Acolyte) on Jul 21, 2018 at 19:11 UTC
    Thank you so much

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found