How to install perl in RHEL 7?

23,961

Just executing yum clean all:

yum clean all

Then this issue is solved.

Share:
23,961

Related videos on Youtube

Nan Xiao
Author by

Nan Xiao

Updated on September 18, 2022

Comments

  • Nan Xiao
    Nan Xiao almost 2 years

    I use RHEL 7.2 and want to install perl. Executing yum install perl, it outputs the following:

    # yum install perl
    ......
    Total size: 11 M
    Total download size: 8.0 M
    Installed size: 36 M
    Is this ok [y/d/N]: y
    Downloading packages:
    No Presto metadata available for rhel-7-server-rpms
    perl-File-Path-2.09-2.el7.noar FAILED                                            ]  0.0 B/s |    0 B  --:--:-- ETA
    https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/Packages/perl-File-Path-2.09-2.el7.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=rhel-7-server-rpms clean metadata
    Trying other mirror.
    perl-5.16.3-286.el7.x86_64.rpm FAILED                                            ] 258 kB/s | 4.7 MB  00:00:13 ETA
    https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os/Packages/perl-5.16.3-286.el7.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=rhel-7-server-rpms clean metadata
    Trying other mirror.
    
    
    Error downloading packages:
      perl-File-Path-2.09-2.el7.noarch: [Errno 256] No more mirrors to try.
      4:perl-5.16.3-286.el7.x86_64: [Errno 256] No more mirrors to try.
    

    I have tried yum --enablerepo=rhel-7-server-rpms clean metadata, but the result is same. How can fix this issue to install perl successfully on RHEL 7?