Most likely not, as Perl is often used by the OS vendor for some tools of your operating system.
I recommend installing a second version of Perl that you maintain.
See the INSTALL file in your Perl distribution.
| [reply] |
You don't want to do that.
You really, really don't want to do that.
Many components of your operating system rely on /usr/bin/perl being there, and some of them rely on it being a specific version of Perl (or at least haven't been tested with any other version) and possibly also require it to be built with certain options. If you remove it, you will almost certainly break your OS badly enough that it may not be possible to recover, short of reinstalling the OS from scratch.
Now, if you want to install an additional version of Perl, then that's perfectly fine - many people even recommend this as a Best Practice because it insulates you from changes to the system perl and allows you to run a newer version of Perl if you so choose. If you really wanted to, you could even install every existing version of Perl on your machine at the same time and run them all side-by-side with no problems. But leave /usr/bin/perl and your distribution's perl package alone. | [reply] [d/l] [select] |
additional to the warnings by the other monks, which i agree 100%, I will highlight another danger larking for your system: even if you don't touch the system perl but upgrade a specific module which it uses it may break things. So, spend some 5 minutes in investigating perlbrew it will help you manage many versions of perl including installing new modules and leave the system perl alone. You will even forget it is there...
| [reply] |
| [reply] |
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.
| [reply] |
| [reply] |
| [reply] |
Don't mess with the system Perl. System tools may depend on it, and other packages surely do. IF your system's package manager provides you a way of upgrading it, great. Otherwise, just install a fresh copy in a different directory.
| [reply] |