Total Pageviews

Sunday, 8 June 2014

如何升级linux vps自带的perl的版本到5.22.1版?

wget http://www.cpan.org/src/perl-5.22.1.tar.gz
tar zxvf perl-5.22.1.tar.gz
cd perl-5.22.1

as3:~/perl-5.22.1# ./Configure -des -Dprefix=/usr (设置安装目录为/usr,意思就是覆盖安装系统里原有的程序perl)
as3:~/perl-5.22.1# make
as3:~/perl-5.22.1# make install
as3:~/perl-5.22.1# perl -v (下面显示了v5.22.1,  说明版本成功升级到了v5.22.1)

This is perl 5, version 22, subversion 1 (v5.22.1) built for i686-linux

Copyright 1987-2011, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

as3:~/perl-5.22.1#

或按这里http://www.linux521.com/2009/system/200905/3095.html的做法也行,它是另外指定安装目录。

 http://www.linux521.com/不错,学习linux的好地方。