您的位置:首页 > 运维架构 > Linux

Linux上升级perl版本 .

2013-03-22 09:10 267 查看
Linux系统自带的perl版本一般为:v5.8.8。但是目前很多模块要求perl版本必须要5.10以上,例如:Excel::Writer::XLSX。

升级步骤如下:

1:查询perl的真实安装路径

whereis perl

perl: /usr/bin/perl /etc/perl /usr/lib/perl /usr/X11R6/bin/perl /usr/bin/X11/perl /usr/local/bin/perl /usr/local/lib/perl /usr/share/perl /usr/share/man/man1/perl.1.gz

真实安装路径为:/usr/bin/perl

2:下载新版本perl
http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz
3:安装包

# tar xvf perl-5.14.1.tar.gz

# cd perl-5.14.1

# ./Configure -des -Dprefix=/usr ----/usr 为perl的安装路径根目录

# make

# make install

4:查询perl是否安装成功

# perl -version

This is perl 5, version 14, subversion 1 (v5.14.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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: