perl版本升级记录linux
工做须要,perl版本太旧不支持相关功能,因此进行版本升级程序员
注意:为了系统的稳定以及更好地管理,适当进行备份,通常遵循ui
一、安装this
find / -name perl #查询perl路径,确认相关 tar -zxvf perl-5.26.0.tar.gz #解压压缩包 cd perl-5.26.0 #进入文件目录 ./Configure -des -Dprefix=/usr/local/perl #指定编译安装路径 make make test make install #如出现cc错误,安装基础环境 yum -y install gcc #若是这个过程没有错误的话,那么恭喜你安装完成了.
二、替换code
##可是这只是安装完成了,并无与系统契合,系统使用的仍是旧版本 #so 干掉旧版本 mv /usr/bin/perl /usr/bin/perl.bak #备份,程序员的平常 ln -s /usr/local/perl/bin/perl /usr/bin/perl #创建新的软链接,使安装的perl生效
三、检测it
#检测 perl -v This is perl 5, version 26, subversion 0 (v5.26.0) built for i686-linux Copyright 1987-2017, 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. #成功