Yum error - centos 7.1 x86_64

I ran into a problem with the yum command on a dedicated server (hosted by OVH):

[ root@mail-server ~]# yum clean all [ root@mail-server ~]# yum update Modules complémentaires chargés : fastestmirror One of the configured repositories failed (Inconnu), 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. Disable the repository, 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> 4. 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 find a valid baseurl for repo: base/7/x86_64 

After researching, I found that the error is below (URL does not return from the dedicated server):

KO From a dedicated server:

 [ root@mail-server ~]# curl "http://mirrorlist.centos.org/?release=7.1.1503&arch=x86_64&repo=os" Invalid release [ root@mail-server ~]# 

OK From Home (ADSL)

 MacBook-Air-de-John:~ jjohn$ curl "http://mirrorlist.centos.org/?release=7.1.1503&arch=x86_64&repo=os" http://mirror.ate.info/ftp.centos.org/7.1.1503/os/x86_64/ http://ftp.rezopole.net/centos/7.1.1503/os/x86_64/ http://distrib-coffee.ipsl.jussieu.fr/pub/linux/centos/7.1.1503/os/x86_64/ http://mirror0.babylon.network/centos/7.1.1503/os/x86_64/ http://centos.crazyfrogs.org/7.1.1503/os/x86_64/ http://centos.mirrors.ovh.net/ftp.centos.org/7.1.1503/os/x86_64/ http://mirrors.ircam.fr/pub/CentOS/7.1.1503/os/x86_64/ ftp://ftp.free.fr/mirrors/ftp.centos.org/7.1.1503/os/x86_64/ http://mirror.ibcp.fr/pub/Centos/7.1.1503/os/x86_64/ http://ftp.ciril.fr/pub/linux/centos/7.1.1503/os/x86_64/ MacBook-Air-de-John:~ jjohn$ 

I have the same problem after a new installation on another dedicated server (hosted by OVH too).

I do not know if the error comes from the OVH network (DNS, ...) or the mirrorlist.centos.org server.

+6
source share
3 answers

I solved the problem by typing

 # dhclient 
+26
source

Your DNS doesn't seem to allow centos mirroring

Put "nameserver 8.8.8.8" in "/etc/resolv.conf"

# vi / etc / resolv.conf [press i] you are now in insert mode

nameserver 8.8.8.8 [press: wq]

#

hope it worked ..!

+1
source

first you need to go to the /etc/yum.repos.d directory and edit CentOS-Base.repo using the vi editor. find the following lines;

mirrorlist =

BaseUrl =

remove the # sign in #baseurl if you find it difficult to access the baseurl / mirrorlist web address using yum, then save and exit the vi editor.

goodluck and enjoy the yum package management utility on linux.

Best wishes - KB

0
source

Source: https://habr.com/ru/post/987821/


All Articles