Linux安装Perl(最新版)

安装目录

mkdir /opt/perl && cd /opt/perl

安装包下载

wget https://www.cpan.org/src/5.0/perl-5.36.0.tar.gz --no-check-certificate

注意:https://www.cpan.org/src获取最新偶数版本下载链接并替换(偶数版本为稳定版)
安装包解压

tar -zxvf perl-5.36.0.tar.gz && rm -rf perl-5.36.0.tar.gz

安装配置

cd /opt/perl/perl-5.36.0 && ./Configure -des -Dprefix=/opt/perl/perl-5.36.0

编译安装

make && make test && make install

环境变量

echo "export PERL_HOME=/opt/perl/perl-5.36.0" >> /etc/profile
echo "export PATH=\$PERL_HOME/bin:\$PATH" >> /etc/profile
source /etc/profile

卸载旧版本

yum -y remove perl

查看新版本

perl -v

原文链接:https://blog.csdn.net/tongxin_tongmeng/article/details/127901853



posted @ 2023-03-01 13:51  SAP道长  阅读(917)  评论(0编辑  收藏  举报