Error cannot retrieve metalink for repository epel please verify its path and try again centos

I'm trying to update Orion ContextBroker using the command yum install contextBroker. Unfortunatelly I get the following error: Loaded plugins: fastestmirror, refresh-packagekit, security Loadi...

I’m trying to update Orion ContextBroker using the command yum install contextBroker. Unfortunatelly I get the following error:

Loaded plugins: fastestmirror, refresh-packagekit, security Loading

mirror speeds from cached hostfile

Error: Cannot retrieve metalink for repository: epel. Please verify
its path and try again

What could be going wrong ?

asked Nov 4, 2014 at 12:08

JosepB's user avatar

3

You just needed to update ca-certificates package. Before that just disable all repos with https that are failing.
That’s why solution with commenting mirrorlist or using http instead https would work also.

For example if you need to disable only epel repo:

yum --disablerepo=epel -y update  ca-certificates

This will also help wget, curl, and anything else that uses SSL certificates.

Darryl Hein's user avatar

Darryl Hein

141k91 gold badges216 silver badges260 bronze badges

answered Dec 27, 2014 at 12:12

XoR's user avatar

XoRXoR

2,5464 gold badges17 silver badges15 bronze badges

10

I solved this issue editing both /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo files, commenting all entries starting with mirrorlist=... and uncommenting all the entries starting with baseurl=....

Darryl Hein's user avatar

Darryl Hein

141k91 gold badges216 silver badges260 bronze badges

answered Nov 4, 2014 at 12:51

fgalan's user avatar

fgalanfgalan

11.4k9 gold badges44 silver badges87 bronze badges

6

use this command:

sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

or alternatively use command

vi /etc/yum.repos.d/epel.repo

go to line number 4 and change the url from

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

to

mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

AliLotfi's user avatar

AliLotfi

8263 gold badges19 silver badges38 bronze badges

answered Jan 12, 2015 at 12:23

sumit pandit's user avatar

4

Updating curl worked for us. Somehow yum uses curl for its transactions.

yum update curl --disablerepo=epel

answered Jun 14, 2019 at 7:54

sbetharia's user avatar

sbethariasbetharia

3633 silver badges7 bronze badges

2

I guess this should work. I solved my problem with this.

$ sudo yum clean all

$ sudo yum —disablerepo=»epel» update nss

answered Jun 26, 2015 at 6:09

Varun's user avatar

VarunVarun

6,48119 gold badges82 silver badges118 bronze badges

4

For my case commenting out mirrorlist and uncomenting entries with baseurl din’t work. I noticed the problem was with the https iniside the .repofedora files. I solved it by going in /etc/yum.repository.d and replacing all https with http in different .repo files. That worked!!

answered Nov 23, 2014 at 15:37

Joseph N.'s user avatar

Joseph N.Joseph N.

2,3771 gold badge22 silver badges31 bronze badges

1

Check if you access internet through a proxy, and then your add internet proxy address to yum configuration.

add

proxy=http://ip:port

to /etc/yum.conf

Community's user avatar

answered May 3, 2016 at 9:54

Rashad Saif's user avatar

Rashad SaifRashad Saif

1,36910 silver badges16 bronze badges

3

Walkthrough Steps

Running the following command will update the repo to use HTTP rather than HTTPS:

sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

You should then be able to update with this command:

yum -y update

Dalton Cézane's user avatar

answered Jan 9, 2015 at 11:02

Varadhan Work's user avatar

2

You may come across this message/error, after installing epel-release. The quick fix is to update your SSL certificates:

yum -y upgrade ca-certificates

Chances are the above error may also occur while certificate update, if so, just disable the epel repo i.e. use the following command:

yum -y upgrade ca-certificates --disablerepo=epel 

Once the certificates will be updated, you’ll be able to use yum normally, even the epel repo will work fine. In case you’re getting this same error for a different repo, just put it’s name against the --disablerepo=<repo-name> flag.


Note: use sudo if you’re not the root user.

answered Dec 2, 2016 at 7:34

Nabeel Ahmed's user avatar

Nabeel AhmedNabeel Ahmed

17.8k4 gold badges56 silver badges61 bronze badges

1

I solved this problem by this solution.

you just change in this file /etc/yum.repos.d/epel.repo

mirrorlist= change this url https to http

baseurl= change this url https to http

bummi's user avatar

bummi

27k13 gold badges62 silver badges101 bronze badges

answered Feb 4, 2015 at 6:28

how to i start's user avatar

0

All of the above did not work for me, but a rebuild of the rpm database, with the following command, did:

sudo rpm --rebuilddb

Thanks all for the help.

Dalton Cézane's user avatar

answered Mar 5, 2015 at 20:20

Beavus Slagerty's user avatar

1

I encountered the same issue even though the ca-certificates package is up-to-date. The mirror https://mirrors.fedoraproject.org/ is currently signed by DigiCert High Assurance EV Root CA which is included in my ca-bundle

$ grep -A 3 "DigiCert High" /etc/ssl/certs/ca-bundle.crt 
# DigiCert High Assurance EV Root CA
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3

The reason why https connections failed in my case, was that system date was set to the year 2002 in which the DigiCert High Assurance EV Root CA is not (yet) valid.

$ date
Di 1. Jan 11:10:35 CET 2002

Changing the system time fixed the issue.

answered Apr 23, 2018 at 8:00

sauerburger's user avatar

sauerburgersauerburger

4,3313 gold badges28 silver badges41 bronze badges

1

I tried most of these solutions and none of them worked for me.

The only thing that worked for me was to disable and remove the offending repo.

sudo yum --disablerepo=epel* remove epel-release.noarch

answered Mar 18, 2021 at 17:20

Fred's user avatar

FredFred

1,0241 gold badge12 silver badges32 bronze badges

For boxes that does not have internet access, you can remove epel repository:

yum remove epel-release --disablerepo=epel

This happened to me as I accidentally installed epel-release using rpm on a prod box.

answered Jun 30, 2016 at 17:39

Howard Lee's user avatar

Howard LeeHoward Lee

9671 gold badge11 silver badges20 bronze badges

I’ve workaround this issue by changing the https entries in epel.repo file to http.

answered Apr 13, 2015 at 14:26

Fabricio's user avatar

I was getting this error when running a Centos 7 virtualbox VM on Windows 10. After much faff I found the error was coming from yum trying to use IPV6 so I had to edit /etc/yum.conf by adding:

ip_resolve = 4

I hope this helps someone else spend less time on this error than me!

answered Oct 18, 2021 at 15:54

donbale's user avatar

First of all, check your «yum» configuration in /etc/yum.conf
Then do try above tips :-)

answered Oct 28, 2021 at 12:10

Nedeljko Markovic's user avatar

1

Changing the mirrorlist URL from https to http fixed the issue for me.

answered Apr 19, 2016 at 20:26

Anil Reddy's user avatar

Fixed mine like this:

yum install elfutils-default-yama-scope-0.168-8.el7.noarch --disablerepo=epel
yum install nss-pem -disablerepo=epel
yum reinstall ca-certificates --disablerepo=epel
yum clean all
rm -rf /var/cache/yum
yum update`

Dalton Cézane's user avatar

answered Oct 30, 2017 at 22:38

Future's user avatar

FutureFuture

3888 silver badges20 bronze badges

None of these worked for me (I didn’t even try the hacks like manually editing the repo file).

However it worked after a simple yum update -y

answered May 29, 2019 at 21:38

jaustin's user avatar

jaustinjaustin

9151 gold badge7 silver badges9 bronze badges

Another possible cause is that your architecture is not supported. I ran into this because I was provided with a CentOS VM, wanted to install EPEL and couldn’t for the life of me get it done.

Turns out the VM was CentOS 7 i386, which is an architecture that is apparently no longer supported by EPEL. I guess the only remedy in this case is to reinstall.

answered Dec 18, 2019 at 9:22

aross's user avatar

arossaross

2,9893 gold badges32 silver badges37 bronze badges

In my case when I comment out mirrorlist the error got away but the repo was also not working so I manually point the right baseurl in /etc/yum.repos.d/epel.repo as below

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://iad.mirror.rackspace.com/epel/7Server/x86_64/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://iad.mirror.rackspace.com/epel/7Server/x86_64/debug/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://iad.mirror.rackspace.com/epel/7Server/SRPMS/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

answered Jul 7, 2020 at 16:35

Rohit Sharma's user avatar

Try

yum clean all --enablerepo=*

Then

yum update --disablerepo=epel

answered Dec 6, 2020 at 17:40

Omid Estaji's user avatar

Omid EstajiOmid Estaji

3034 silver badges10 bronze badges

For obsolete CentOS 6, I used this in /etc/yum.repos.d/epel.repo

baseurl=https://d2lzkl7pfhq30w.cloudfront.net/pub/archive/epel/6/$basearch

answered Jun 21, 2021 at 7:37

grepmaster's user avatar

Думаю всем уже известно, что поддержка обновлений системы Centos 6 уже завершена, поэтому при попытке установить какой-либо пакет вы можете получить некоторые ошибки. Рассмотрим некоторые из них.

yum error “Cannot retrieve metalink for repositoryepelPlease verify its path and try again

В EPEL теперь, по умолчанию, используется HTTPS вместо HTTP в названии URL, а установка HTTPS соединения требует, чтобы у вас в системе стояли свеженькие корневые и местные SSL-сертификаты. Некоторые советуют тупо заменить в файле /etc/yum.repos.d/epel.repo все «https» на «http». Да, так тоже работать будет, но это очень кривой способ. Проще и правильней обновить нужные пакеты, указав временное выключение репозитория EPEL.

И так, запускайте для правильного способа эти команды:
yum makecache --disablerepo=epel
yum upgrade --disablerepo=epel ca-certificates nss nss-tools nss-utils

или не очень правильно…
sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

вручную
nano /etc/yum.repos.d/epel.repo
Приведем оригинальную строку к следующему виду — укажем http вместо https:
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
заменим на
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Ошибка: Cannot find a valid baseurl for repo: base

30 ноября 2020 года поддержка операционной системы CentOS 6 была прекращена. Поэтому, для возобновления работы менеджера пакетов YUM нужно обновить ссылки на репозитории.

Перейдем в директорию cd /etc/yum.repos.d/

За бэкапим оригинальный файл:

cp CentOS-Base.repo CentOS-Base.repo.old

Теперь откроем файлик репозитория редактором «nano CentOS-Base.repo» и приведем к следующему виду:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=https://vault.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=https://vault.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Осталось только очистить кэш YUM и можно начать ставить нужные вам пакеты:

yum clean all

Аватар пользователя admin

Если у вас при попытке выполнить какую-либо операцию с yum он начинает выдавать ошибку «Cannot retrieve metalink for repository: epel. Please verify its path and try again” или вы видите сообщение: «Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was«, то это с большой степенью вероятности означает, что вы давненько не обновляли вашу операционную систему.

В EPEL теперь, по умолчанию, используется HTTPS вместо HTTP в названии URL, а установка HTTPS соединения требует, чтобы у вас в системе стояли свеженькие корневые и местные SSL-сертификаты. Некоторые советуют тупо заменить в файле /etc/yum.repos.d/epel.repo все «https» на «http». Да, так тоже работать будет, но это очень кривой способ. Проще и правильней обновить нужные пакеты, указав временное выключение репозитория EPEL. Итак, запускайте:

yum makecache --disablerepo=epel
yum upgrade --disablerepo=epel ca-certificates nss nss-tools nss-utils 

и если всё обновится, то больше ничего и не нужно — ошибки исчезнут.

  • 5637 просмотров

CentOS EPEL Error: Cannot retrieve metalink for repository: epel.

Problem

Resolve the «CentOS EPEL Error: Cannot retrieve metalink for repository: epel» error on CentOS.

tl;dr

sudo sed -i 's/(mirrorlist=http)s/1/' /etc/yum.repos.d/epel.repo

Solution

If you see an error when attempting to install or update a package, such as:

# yum install mypackage
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

This is fairly common on CentOS 6 if you attempt to use the EPEL repository, and occurs when you attempt to retrieve files from the HTTPS server instead of the HTTP server.

There are two solutions:

Bash command solution

Run the following command from your command line:

sudo sed -i 's/(mirrorlist=http)s/1/' /etc/yum.repos.d/epel.repo

Edit configuration file

While the previous method directly erases the ‘S’ in ‘HTTPS’, you can also do it by editing the repository configuration file.

nano /etc/yum.repos.d/epel.repo

Then, find any lines such as:

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

And erase the S from any instances of https://

mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

Was this article helpful?

mood_bad
Dislike
38

mood
Like
75

visibility
Views:
57991

 centos, epel


0

1

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again. Я не знаю что за металинки, но такое чувство, что просто отключили репозиторий и решили закопать выпуск.

Центось свежая, виртуалка на digitalocean.

  • Ссылка

Что такое метадата? И нет, всё равно не работает.

Deleted

(06.09.17 15:43:32 MSK)



Последнее исправление: Romashev 06.09.17 15:44:25 MSK
(всего

исправлений: 1)

  • Ссылка

# yum update
Loaded plugins: fastestmirror, keys, remove-with-leaves, show-leaves
Setting up Update Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                         |  13 kB     00:00
 * base: repos.dfw.quadranet.com
 * epel: fedora-epel.mirrors.tds.net
 * extras: mirror.datto.com
 * updates: mirror.es.its.nyu.edu
adobe-linux-i386                                                                                                                                                      | 2.9 kB     00:00
base                                                                                                                                                                  | 3.7 kB     00:00
epel                                                                                                                                                                  | 4.3 kB     00:00
epel/primary_db                                                                                                                                                       | 5.0 MB     00:01
extras                                                                                                                                                                | 3.3 kB     00:00
updates                                                                                                                                                               | 3.4 kB     00:00
No Packages marked for Update

Что-то не так с вашим инетом

// b.

anonymous

(06.09.17 15:48:32 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от anonymous 06.09.17 15:48:32 MSK

Ответ на:

комментарий
от Deleted 06.09.17 15:50:36 MSK

2 варианта:

1) через VPN

2) выключаете mirrorlist и включаете ваш любимый URL в /etc/yum.repos.d/epel.repo

// b.

anonymous

(06.09.17 16:01:55 MSK)

  • Ссылка

Похоже сегодня мудят google dns, с dns от yandex всё заработало.

Deleted

(06.09.17 16:14:55 MSK)

  • Показать ответ
  • Ссылка

У меня тоже такое было, не ресолвился mirrors.fedoraproject.org.

Deleted

(06.09.17 16:22:08 MSK)

  • Ссылка

Ответ на:

комментарий
от Deleted 06.09.17 16:14:55 MSK

Или м*т ваш провайдер. Сейчас же в перде везде DPI понатыкали. В идеале сидеть через VPN + CryptoDNS.

// b.

anonymous

(06.09.17 16:55:02 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от anonymous 06.09.17 16:55:02 MSK

Дык это и был VPN гейт, как раз openvpn не мог поставить.

Deleted

(06.09.17 18:59:50 MSK)

  • Ссылка

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

I’ve got a VM running CentOS 6 (64bit) and I’m attempting to add the EPEL repo like usual to install various packages as I do quite regularly.

Today, I’m experiencing some strange errors yet I’m doing absolutely nothing differently.

I’m adding EPEL like so:

# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

Yet when I try running yum for anything, I’m getting this error:

[root@core /]# yum list

Loaded plugins: fastestmirror

Determining fastest mirrors

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Any ideas? I’m stumped!

Community's user avatar

asked Oct 16, 2014 at 15:12

Tom Wilson's user avatar

3

The correct fix is to update your SSL certificates.

sudo yum upgrade ca-certificates --disablerepo=epel

You need to disable the epel repo so that this command will succeed. After you update your certificates you can use yum normally as EPEL will work again.

answered Dec 24, 2014 at 18:25

Jo Rhett's user avatar

Jo RhettJo Rhett

1,3101 gold badge9 silver badges5 bronze badges

6

I had this problem, and it boiled down to the SSL certificate not being verifiable when getting the updated metalink file for EPEL via HTTPS. I suppose that I could have drilled down through the certificate chain to find out why, but in order to get my server working again, I sidestepped the problem by adding the following line into /etc/yum.repos.d/epel.repo:

[epel]
...
sslverify=false

I didn’t think this was insanely unsafe, because the packages themselves are still verified by GPG-signature check.

answered Oct 16, 2014 at 15:52

MadHatter's user avatar

MadHatterMadHatter

79k20 gold badges182 silver badges230 bronze badges

1

You can modify the epel repo to use http instead of https by running the following as root/sudo

sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

answered Oct 8, 2015 at 1:30

siebo's user avatar

siebosiebo

1291 silver badge1 bronze badge

0

Ridiculously using secure HTTP is causing a problem yet normal HTTP is working fine. This shouldn’t be happening with a fresh install so there must be an issue with Fedora’s repositories. It’s working now.

answered Oct 16, 2014 at 15:37

Tom Wilson's user avatar

Tom WilsonTom Wilson

7191 gold badge6 silver badges7 bronze badges

2

Во время добавления epel на CentOS 6:
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6*.rpm

Получил ошибку:
# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

# vim /etc/yum.repos.d/epel.repo 

mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

# yum repolist

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

epel/metalink                                                                                                                 |  28 kB     00:00     

 * base: mirror.corbina.net

 * epel: mirror.logol.ru

 * extras: mirror.corbina.net

 * updates: mirror.corbina.net

epel                                                                                                                          | 4.4 kB     00:00     

epel/primary_db                                                                                                               | 6.3 MB     00:03     

repo id                                              repo name                                                                                 status

base                                                 CentOS-6 — Base                                                                            6,367

epel                                                 Extra Packages for Enterprise Linux 6 — x86_64                                            11,124

extras                                               CentOS-6 — Extras                                                                             15

updates                                              CentOS-6 — Updates                                                                         1,602

vz-base                                              vz-base                                                                                        3

vz-updates                                           vz-updates                                                                                     8

repolist: 19,119

Вот и все. Наглый копипаст отсюда:

Question: I was trying to install Xen server on CentOS 6.4 via yum install xen, but yum failed with an error message as “Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again“. How to solve this?

Snapshot of the error:

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

Solution:

The issue is because, the EPEL repos are by default set to use https (this is not an issue actually, but the ca-certificates used for https). It means, you need to have an updated CA certificates. There are couple ways you can fix this issue.

tech forum

Option 1: You can simply change the EPEL repo endpoint to use http protocol instead of https. To do that, run the below command as root.

# sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo

(or)

# vi /etc/yum.repos.d/epel.repo

and change mirrorlist to point to ‘http‘ instead of ‘https

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
to
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearchm

Option 2: Update SSL certificates

yum upgrade ca-certificates --disablerepo=epel

Note: disable epel repo while upgrading the ca-certificates.

That’s it! You can continue to use EPEL repo normally for ‘yum’ installs.

Related : Useful  Yum commands

Situation : I have installed epel-release-latest-6.noarch.rpm on CentOS release 6.10 (Final) and trying to install 
python-pip, but getting the below error.


[root@puppetlabs tmp]# rpm -ivh epel-release-latest-6.noarch.rpm
warning: epel-release-latest-6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing…                ########################################### [100%]
   1:epel-release         ###########################################  [100%]
[root@puppetlabs tmp]#
[root@puppetlabs tmp]# yum install python-pip
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again


Solution:


Edit both /etc/yum.repos.d/epel.repo and /etc/yum.repos.d/epel-testing.repo files, commenting all entries 
starting with mirrorlist=  and uncomment all the entries starting with baseurl= 


epel.repo base url is changed from http://download.fedoraproject.org/pub/epel/6/  to http://del-repos.extreme-ix.org/epel/6/x86_64/repodata/ update the same.
epel-testing.repo base url is changed from http://del-repos.extreme-ix.org/epel/testing/6/ to http://del-repos.extreme-ix.org/epel/testing/6 update the same.


Now run yum repolist command.


[root@puppetlabs yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.far.fi
 * extras: centos.mirror.far.fi
 * updates: centos.mirror.far.fi
repo id                 repo name                                                                        status
base                    CentOS-6 — Base                                                               6,713
epel                     Extra Packages for Enterprise Linux 6 — x86_64           12,522
extras                  CentOS-6 — Extras                                                                 31
updates               CentOS-6 — Updates                                                             114
repolist: 19,380


Hope it helps.

I installed the EPEL tools via ‘yum install epel-release’ and now I cannot ‘yum update’ without getting «Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again» errors.

I found a page from 2014 where the member was receiving similar errors as I.

  • Installing Epel repository on CentOS fails

One of the comments states to change the /etc/yum.repos.d/epel.repo to use the baseurl instead of the mirrorlist as mentioned in another page/answer.

  • How to install PostGIS on Oracle Linux 6.4 x64?

Following the second link, the change seems simple enough but after looking at /etc/yum.repos.d/epel.repo, there are three baseurl/mirrorlist lines. I’m not sure whether to update my [epel], [epel-debuginfo], and/or [epel-source].

What is the consequence of me changing all three lines? This is a production server and I’m avoiding breaking it as I just got it setup and working.

Here is a copy of my /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch 
failovermethod=priority 
enabled=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo] 
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch 
failovermethod=priority 
enabled=0 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 
gpgcheck=1

[epel-source] 
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS 
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch 
failovermethod=priority 
enabled=0 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 
gpgcheck=1

Понравилась статья? Поделить с друзьями:
  • Error cannot read property match of undefined
  • Error cannot read boot image header
  • Error cannot pull with rebase you have unstaged changes error please commit or stash them
  • Error cannot open winrar
  • Error cannot open trainz asset database