YUM installation error : Cannot retrieve metalink for repository

Tags: GPG keyinstallationretrieve metalinkyum error

Published on: October 1, 2014 by Arnold Pablo

YUM installation error : Cannot retrieve metalink for repository


Here we are trying to help you to fix one of the most common  Yum install error

Error 1:

yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

You should try these steps so that the metalinks can be retried to be downloaded again.

Steps to solve the issue – Cleaning the YUM header database

yum clean all
yum search php
yum install php

You can see that it is getting downloaded, but you may also be stopped with an error below

GPG error when trying to compare the signature

GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

First see whether the file is there by doing a `ls` as below

ls /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Most probably you may be getting a file not found message. In any case you need to search Google for  RPM-GPG-KEY-EPEL-6 . You will get the GPG key from internet which you can import as below

Importing GPG Key

wget --no-check-certificate
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Even if you download you can still proceed with yum install and it will auto import the key, once found, like below

Auto Importing if present

Total size: 27 M
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid: “EPEL (6) <>”
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y

Get 24/7 expert server management

Category : Howtos, Linux, Troubleshooting

Arnold Pablo

Arnold Pablo

Technology always fascinated me and continues to do so. I started my career back in 2004 as a Junior System Admin and worked in various capacities both in technical and managerial roles. I love to experiment and try out new OSS projects and in free time, go for cycling to the interiors of God's own country, Kerala!

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items