首页 > 解决方案 > 无法在 RHEL 7.6 中将 Perl 5.8 升级到 5.16

问题描述

6 并且无法从 5.8.9 升级我的机器。当我使用 yum install perl 安装时,它说安装成功,但是当我检查版本时它仍然是旧版本。我需要版本为 5.10 或更高版本。以下是详细信息:

bash$ cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
bash$ 
bash$ yum info perl
Name        : perl
Arch        : x86_64
Epoch       : 4
Version     : 5.16.3
Release     : 294.el7_6
Size        : 22 M
Repo        : installed
From repo   : rhel-7-server-rpms
Summary     : Practical Extraction and Report Language
URL         : http://www.perl.org/
bash$ perl -v

This is perl, v5.8.9 built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2008, 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.
bash$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/puppetlabs/bin:/a
bash$ whereis perl
perl: /usr/bin/perl /usr/local/bin/perl5.6 /usr/local/bin/perl5.8 /usr/local/bin/perl /auto/usrcisco-linux-rhel7.0-x86-64/packages/perl/perl-5.8.9/bin/perl /usr/share/man/man1/perl.1.gz

解决方案:

bash$ whereis perl5.16.3
perl5.16: /usr/bin/perl5.16.3
bash$ ll | grep -i perl
lrwxrwxrwx.  1 root root   19 Jul  2  2019 perl -> /usr/ravi/bin/perl
bash$ sudo ln -s -f /usr/bin/perl5.16.3 perl
bash$ 
bash$ ll | grep -i perl
lrwxrwxrwx   1 root root   19 Feb 22 17:49 perl -> /usr/bin/perl5.16.3
bash$ perl --version
perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 39 registered patches, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

提前感谢您的任何意见

标签: linuxbashperlrhelrhel7

解决方案


bash$ whereis perl5.16.3
perl5.16: /usr/bin/perl5.16.3
bash$ ll | grep -i perl
lrwxrwxrwx.  1 root root   19 Jul  2  2019 perl -> /usr/ravi/bin/perl
bash$ sudo ln -s -f /usr/bin/perl5.16.3 /usr/bin/perl
bash$ 
bash$ ll | grep -i perl
lrwxrwxrwx   1 root root   19 Feb 22 17:49 perl -> /usr/bin/perl5.16.3
bash$ perl --version
perl -v

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 39 registered patches, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

推荐阅读