How to upgrade the default Perl version in Linux
16:42:00 | category:
Linux | font size subscription
We do not recommend RM first.
First download tar.gz... and then manually install .. default to the/usr/local/directory ..
Then modify the symbolic link of/usr/bin/perl to/usr/local/bin/Perl.
The local system is centos4.5. try the latest version.
:
[Url] http://www.cpan.org/src/readme.html#/url]
Download link:
[Url] http://www.cpan.org/src/perl-5.10.0.tar.gz#/url]
The download method does not need to be mentioned. I am used to wget. So wget [url] http://www.cpan.org/src/perl-5.10.0.tar.gz#/url].
Decompress and install
# Tar zxvf perl-5.10.0.tar.gz
# Cd perl-5.10.0
#./Configure-des-dprefix =/usr/local/perl
Parameter-dprefix: Specify the installation directory as/usr/local/Perl.
# Make
# Make Test
# Make install
If this process is correct, congratulations on the installation. Is it very easy?
Next we will replace the original Perl of the system. If we have the latest version, we will use it.
# Mv/usr/bin/perl. Bak
# Ln-S/usr/local/perl/bin/perl/usr/bin/perl
# Perl-V
This is Perl, v5.10.0 built for i686-linux
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the artisticlicense or
GNU General Public License, which may be found in the Perl 5 sourcekit.
Complete documentation for Perl, including FAQ lists, shocould befound on
This system using "Man Perl" or "perldoc Perl". If you have accessto
Internet, point your browser at [url] http://www.perl.org/#/url#, the Perl home page.
Well, if your execution of Perl-V is the same as my prompt, the installation is successful.
Then you can use it to install some other Perl modules you need.
# Perl-mcpan-e Shell
If you run the command for the first time, you will be prompted to install CPAN and require the connection network to download the latest module list. Then you can install the module.
CPAN [1]> install DBI
Is it easy?
Now the problem arises. How can I uninstall it? I tried to make Uninstall. It doesn't work.