Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: unintstall and Install Perl linuxby zentara (Archbishop) |
on Jul 21, 2018 at 11:20 UTC ( [id://1219001]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|