6无法从5.8.9升级我的机器。当我使用yum安装时,它说安装成功,但当我检查版本时,它仍然是旧版本。我需要的版本是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预先感谢您的输入
发布于 2021-02-22 12:31:50
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 Wallhttps://stackoverflow.com/questions/66315337
复制相似问题