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 ?
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=...
.
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.
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
For my case commenting out mirrorlist
and uncomenting entries with baseurl
din't work. I noticed the problem was with the https
iniside the .repo
fedora files. I solved it by going in /etc/yum.repository.d
and replacing all https
with http
in different .repo files. That worked!!
Check if you access internet throw proxy then you have to add internet proxy address to yum configuration .
add
proxy=http://ip:port to /etc/yum.conf
I guess this should work. I solved my problem with this.
$ sudo yum clean all
$ sudo yum --disablerepo="epel" update nss
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.
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
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.
Updating curl worked for us. Somehow yum uses curl for its transactions.
yum update curl --disablerepo=epel
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.
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
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.
I solved it by going in /etc/yum.repository.d/. For my case i comment out mirrorlist and uncomenting entries with baseurl. as well as added sslverify=false.
https://serverfault.com/questions/637549/epel-repo-for-centos-6-causing-error
I've workaround this issue by changing the https entries in epel.repo file to http.
Changing the mirrorlist URL from https to http fixed the issue for me.
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`
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
来源:https://stackoverflow.com/questions/26734777/yum-error-cannot-retrieve-metalink-for-repository-epel-please-verify-its-path