Resolve when yum install: Can not retrieve metalink for repository:. Epel Please verify its path and try again

In CentOS 7.6.1810 x64 install glibc-2.17-260.el7_6.5.x86_64 next time there is a problem: Error: Can not retrieve metalink for repository:. Epel Please verify its path and try again, you need to install epel source.

Solution: The /etc/yum.repos.d/epel.repo, the third line comment to remove the file, comment out the fourth line. details as follows:

Open /etc/yum.repos.d/epel.repo, will

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

change into

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

And then clean up the source, re-install

yum clean all
yum install -y 需要的包

If that does not work, modify DNS, to the next /etc/resolv.conf and add the following:

nameserver 8.8.8.8
search localdomain

Then restart the network service: service network restart

Published 21 original articles · won praise 5 · views 10000 +

Guess you like

Origin blog.csdn.net/icodestechnology/article/details/96210456