skip to Main Content

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 ?

2

Answers


  1. Consider using perlbrew. You can install it by the following commands:

    • curl -L https://install.perlbrew.pl | bash
    • Initialize:
      perlbrew init
    • See what is available: perlbrew available

    Then do switch to different perl version by doing the command:

    • perlbrew swith perl-5.16.3
    • perl -v
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search