perl版本升级

perl版本升级记录

工作需要,perl版本太旧不支持相关功能,所以进行版本升级

注意:为了系统的稳定以及更好地管理,适当进行备份,一般遵循

  • 不先rm -rf
  • 先下载tar.gz 文件,然後手动 安装到/usr/local/bin/目录下
  • /usr/bin/perl 建立软连接到 /usr/local/bin/perl

1、安装

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
#如果这个过程没有错误的话,那么恭喜你安装完成了.

2、替换

##但是这只是安装完成了,并没有与系统契合,系统使用的还是旧版本
#so 干掉旧版本
mv /usr/bin/perl /usr/bin/perl.bak
#备份,程序员的日常
ln -s /usr/local/perl/bin/perl /usr/bin/perl
#建立新的软连接,使安装的perl生效

3、检测

#检测
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.


#成功

转载于:https://www.cnblogs.com/backkomjiu/p/7562764.html

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值