yum update: One of the configured repositories failed (Unknown)

Parece que essa semana foi minha de problemas com o tempo…
Ao atualizar um OEL 7, recebo o erro abaixo.

[root@nerv03 ~]# yum -y update
Loaded plugins: langpacks, ulninfo


 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= ...

     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 
        or
            subscription-manager repos --disable=

     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=.skip_if_unavailable=true

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

Todas as soluções apresentadas pela própria saída do erro não são aceitáveis, pois irão desabilitar o repositório.

Em alguma das ocorrências do erro, eu vi uma mensagem falando de certificado expirado. Aí pensei em olhar a data e hora, que estava atrasada em mais de 2 anos.

Bastou corrigir a data e hora, e o update pode ser executado.

[root@nerv03 ~]# date
Thu Jan 19 22:04:59 -02 2017
[root@nerv03 ~]# date -s "27 Jul 2019 08:35:00"
Sat Jul 27 08:35:00 -03 2019
[root@nerv03 ~]# yum -y update
Loaded plugins: langpacks, ulninfo
epel/x86_64/metalink                                                                                                                                                 | 3.5 kB  00:00:00
epel                                                                                                                                                                 | 5.3 kB  00:00:00
ol7_UEKR4                                                                                                                                                            | 2.5 kB  00:00:00
ol7_latest                                                                                                                                                           | 2.7 kB  00:00:00
(1/3): epel/x86_64/group_gz                                                                                                                                          |  88 kB  00:00:00
(2/3): epel/x86_64/updateinfo                                                                                                                                        | 993 kB  00:00:00
(3/3): epel/x86_64/primary_db                                                                                                                                        | 6.8 MB  00:00:02
(1/5): ol7_UEKR4/x86_64/updateinfo                                                                                                                                   |  80 kB  00:00:00
(2/5): ol7_latest/x86_64/group                                                                                                                                       | 810 kB  00:00:00
(3/5): ol7_latest/x86_64/updateinfo                                                                                                                                  | 956 kB  00:00:00
(4/5): ol7_UEKR4/x86_64/primary_db                                                                                                                                   | 3.2 MB  00:00:01
(5/5): ol7_latest/x86_64/primary_db                                                                                                                                  |  25 MB  00:00:04
No packages marked for update
[root@nerv03 ~]#

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.