link 发表于 2018-8-31 08:44:15

linux perl

  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 xvfperl-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.

页: [1]
查看完整版本: linux perl