Cannot retrieve metalink for repository: epel/x86_64

NethServer Version: 7.3.1611

Hi,
i have the problem with “Software center”.
This is error: "Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
The install/update may have failed due to metadata caching issues. Please clean the cache by clicking the button below and retry the install/update operation."
BUTTON “CLEAR YUM CACHE”. Don’t work.

Logon in SSH, i run command “yum update”, Error: "
Loaded plugins: changelog, fastestmirror, nethserver_events

base | 3.6 kB 00:00:00
centos-sclo-rh | 2.9 kB 00:00:00
centos-sclo-sclo | 2.9 kB 00:00:00

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again"

How can i fix it?

Thank you!

Do you have Internet connection?
Try to check through ssh by pinging something from Internet.

yum clean all --enablerepo=*; yum update --disablerepo=epel

then do

yum update

1 Like

Don’t work! The problem remains! :frowning:

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

Could you display the full output please, we are not in front of your screen

Here…

Don’t work!

yum reinstall epel-release --disablerepo=epel

1 Like

then

yum update

:cry:

ll /var/cache/yum/x86_64/7/epel/

total 0
drwxr-xr-x. 2 root root 6 Jun 8 16:27 gen
-rw-r–r--. 1 root root 0 Jun 9 16:53 metalink.xml.tmp
drwxr-xr-x. 2 root root 6 Jun 8 16:27 packages

rm -rf /var/cache/yum/x86_64/7/epel/*;yum update

it could be nice to see your epel.repo, this is mine

[root@NS7DEV9 ~]# cat /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

My…

[root@mail ~]# [root@mail ~]# rm -rf /var/cache/yum/x86_64/7/epel/*;yum update
-bash: [root@mail: command not found
Loaded plugins: changelog, fastestmirror, nethserver_events
base | 3.6 kB 00:00:00
centos-sclo-rh | 2.9 kB 00:00:00
centos-sclo-sclo | 2.9 kB 00:00:00

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
[root@mail ~]# Loaded plugins: changelog, fastestmirror, nethserver_events
-bash: Loaded: command not found
[root@mail ~]#
[root@mail ~]#
[root@mail ~]# One of the configured repositories failed (Unknown),
-bash: syntax error near unexpected token `(’
[root@mail ~]# and yum doesn’t have enough cached data to continue. At this point the only

safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum

-bash: and: command not found
[root@mail ~]# will then just ignore the repository until you permanently enable it
-bash: will: command not found
[root@mail ~]# again or use --enablerepo for temporary usage:
-bash: again: command not found
[root@mail ~]#
[root@mail ~]# yum-config-manager --disable
-bash: syntax error near unexpected token newline' [root@mail ~]# or -bash: or: command not found [root@mail ~]# subscription-manager repos --disable=<repoid> -bash: syntax error near unexpected token newline’
[root@mail ~]#
[root@mail ~]# 5. Configure the failing repository to be skipped, if it is unavailable.
-bash: 5.: command not found
[root@mail ~]# Note that yum will try to contact the repo. when it runs most commands,
-bash: Note: command not found
[root@mail ~]# so will have to try and fail each time (and thus. yum will be be much
-bash: syntax error near unexpected token (' [root@mail ~]# slower). If it is a very temporary problem though, this is often a nice -bash: syntax error near unexpected token )’
[root@mail ~]# compromise:
-bash: compromise:: command not found
[root@mail ~]#
[root@mail ~]# yum-config-manager --save --setopt=.skip_if_unavailable=true
-bash: repoid: No such file or directory
[root@mail ~]#
[root@mail ~]# Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
-bash: Cannot: command not found
[root@mail ~]# [root@mail ~]#
-bash: [root@mail: command not found
[root@mail ~]#

what is your epel.repo

it runs this “rm -rf /var/cache/yum/x86_64/7/epel/*;yum update”

result:
[root@mail ~]# rm -rf /var/cache/yum/x86_64/7/epel/*;yum update
Loaded plugins: changelog, fastestmirror, nethserver_events
base | 3.6 kB 00:00
centos-sclo-rh | 2.9 kB 00:00
centos-sclo-sclo | 2.9 kB 00:00

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=<repoid> ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable <repoid>
    or
        subscription-manager repos --disable=<repoid>

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
[root@mail ~]#