Search code examples
linuxdockerperlinstallationrhel

How To Install Perl 5.30 in RHEL 7.7 Docker container


I want to install Perl v5.30 in my RHEL 7.7 container image. So i tried

#yum install -y perl 
perl-5.16.3-294.el7_6.x86_64 already installed and latest version

I'm able to install perl-5.16.3. But how can I install v5.30 instead of v5.16.3?

I am completely new to Perl. Thanks in advance


Solution

  • If you want to install from yum, then I'm afraid that you're stuck with Perl 5.16 on RHEL7. But there are a couple of solutions that spring to mind.

    • Create your own RPM of a newer version of Perl and then create your own package repo that only contains that package. I'd recommend building it so that the newer Perl is installed in a different location to the existing system Perl.
    • Create a Docker image that is built on the RHEL7 image, but that adds perlbrew and the version of Perl that you want. Then use that image instead of the official RHEL one.