yum -y install perl-CPAN. No package perl-CPAN available.

Latest response

I have a perl script that will not run because Time::Piece.pm is missing.
When I try and install Time::Piece.pm (/usr/bin/perl -MCPAN -e install Time::Piece) fails with this message - Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).

When I try and install CPAN or MCPAN I get this message -
yum -y install perl-CPAN
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
Setting up Install Process
No package perl-CPAN available.
Error: Nothing to do

Why can't I update perl?

Thank you

Responses

Hello Ross Smith.

I'm genuinely curious, What version of Red Hat are you using ? I see from the tags to this thread you started it might relate to RHEL for ARM 64? But I'm curious on the specific version. Also, do you believe perl-CPAN is provided by Red Hat or a third party such as https://www.cpan.org/? The answer to the last question will help us see how we can help you install this. If it is a third party product (as in not from Red Hat), then the provider might have their own yum repository or packages.

Another question, have you seen this Red Hat solution https://access.redhat.com/solutions/4147 Named: How to install perl modules (including cpan), Nov 5 2018? Is that link in this paragraph a fit for the problem you're experiencing?

Please let us know,

Regards,

RJ

RJ, The server is running RHEL 6.5 x86_64, but there was no drop down for that in the list (or at least I didn't see it) Sorry for that. I need to be able to update perl and it seems as if the repo does not have any updates for it. Also, I did see that article, but it does not help as it assumes CPAN is installed already and that is what I am trying to do. Thank you for your prompt response.

Hi Ross,

Not sure what's going wrong here, but I can tell you - the package perl-CPAN is available for RHEL 6 :
https://access.redhat.com/downloads/content/perl-CPAN/1.9402-144.el6/x86_64/fd431d51/package

Probably you're running into problems because you're using a completely outdated operating system.
There's a reason why RJ and myself continuously recommend to upgrade systems to the latest stable
edition. So, what can I say ? Upgrade to RHEL 6.10, or even better : install RHEL 7.6 or RHEL 8.0 ... :)

Regards,
Christian