Search code examples
perlcentos7rpm

Perl's rpm version differs from "perl -v"


I work on CentOS 7 and it seems I have a problem with perl. I need perl at least 5.10 for a project.

When i :

perl -v

I get a message describing a perl v5.8.9 but when i

rpm -qa | grep perl 5-

I get a :

perl-5.16.3-292.el7.x86_64

Back.

I thought that rpm would install this 5.16.3 version but it does not. How do I do it ?


Solution

  • Try running which perl.

    You probably have multiple installed, and your path is determining which one you get.

    A fairly common split is to have a /usr/bin/perl which is your 'system' perl and installed via your package manager, and have another, newer perl installed by downloading and building it into /usr/local/bin.