Yum update repomd.xml Error

General support questions
Post Reply
ozeryumsek
Posts: 1
Joined: 2015/01/10 19:11:56

Yum update repomd.xml Error

Post by ozeryumsek » 2015/01/10 19:20:48

Hello,

I'm trying to update my Centos but I get error below.

I enabled only base repos url. Url is ok I can see content in browser.

Base repo file

Code: Select all

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
#baseurl=http://ftp.itu.edu.tr/Mirror/CentOS/7.0.1406/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

Yum update command output

Code: Select all

[root@nagios yum.repos.d]# yum update
Loaded plugins: fastestmirror
base                                                                                                                                                                   |  80 kB  00:00:00     
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Trying other mirror.


 One of the configured repositories failed (CentOS-7 - Base),
 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 base

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

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for base: Damaged repomd.xml file
Help will be appreciated

Regards

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Yum update repomd.xml Error

Post by avij » 2015/01/10 20:07:47

Perhaps you are using a proxy, and it is causing problems? Perhaps you are not using a proxy, even if you should? See if /etc/yum.conf mentions anything about a proxy. Does this output a valid-looking repomd XML file:

Code: Select all

curl http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml

ytesejam92
Posts: 1
Joined: 2018/01/19 14:38:00

Re: Yum update repomd.xml Error

Post by ytesejam92 » 2018/01/19 14:45:27

avij wrote:Perhaps you are using a proxy, and it is causing problems? Perhaps you are not using a proxy, even if you should? See if /etc/yum.conf mentions anything about a proxy. Does this output a valid-looking repomd XML file:

Code: Select all

curl http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml
I have installed centos 7 on a virtualmachine who have for gateway a fortigate virtual machine, i have a proxy on the LAN, and i put the ip address of the fortigate on the squid.conf(squid proxy), and then works the yum updates! your answer was so helpfull

Post Reply