Hi,
I have a VM running Oracle Linux Server release 5.8 (/etc/oracle-release), and most actions in yum throw an error, like this output from yum repolist:
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
ol5_u8_base | 80 kB 00:00
http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for ol5_u8_base: Damaged repomd.xml file
Trying other mirror.
repo id repo name status
ol5_u8_base Oracle Linux 5 Update 8 installation media copy (x86_64) 4,639
repolist: 4,639
uname -a shows:
Linux mybox.mydom.com 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
I can wget/curl the repomd.xml file from the public yum site just fine. Since this server hasn’t been touched (yum-wise) in over a year, I also downloaded the public-yum-el5.repo and RPM-GPG-KEY-oracle-el5 files again from Oracle Public Yum Server. I’ve attempted to enable/disable all repos listed in the repo file (except the spacewalk ones), but each one throws that «Damaged repomd.xml file» error.
I need to install samba, so I thought I’d try that using yum install samba:
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
ol5_u8_base | 80 kB 00:00
http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for ol5_u8_base: Damaged repomd.xml file
Trying other mirror.
Setting up Install Process
Resolving Dependencies
—> Running transaction check
—> Package samba.x86_64 0:3.0.33-3.37.el5 set to be updated
—> Processing Dependency: perl(Convert::ASN1) for package: samba
—> Running transaction check
—> Package perl-Convert-ASN1.noarch 0:0.20-1.1 set to be updated
—> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================
Installing:
samba x86_64 3.0.33-3.37.el5 ol5_u8_base 16 M
Installing for dependencies:
perl-Convert-ASN1 noarch 0.20-1.1 ol5_u8_base 42 k
Transaction Summary
===========================================================================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-Convert-ASN1-0.20-1.1.noarch.rpm | 80 kB 00:00
http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/x86_64/getPackage/perl-Convert-ASN1-0.20-1.1.noarch.rpm: [Errno -1] Package does not match intended download
Trying other mirror.
(2/2): samba-3.0.33-3.37.el5.x86_64.rpm | 80 kB 00:00
http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/x86_64/getPackage/samba-3.0.33-3.37.el5.x86_64.rpm: [Errno -1] Package does not match intended download
Trying other mirror.
Error Downloading Packages:
samba-3.0.33-3.37.el5.x86_64: failure: getPackage/samba-3.0.33-3.37.el5.x86_64.rpm from ol5_u8_base: [Errno 256] No more mirrors to try.
perl-Convert-ASN1-0.20-1.1.noarch: failure: getPackage/perl-Convert-ASN1-0.20-1.1.noarch.rpm from ol5_u8_base: [Errno 256] No more mirrors to try.
Again, I can wget the files from the server exactly as listed in the yum output. I’ve also tried yum clear all. I thought I had the correct repo enabled, but it doesn’t matter what repo(s) I have enabled, I get the same error.
Thoughts?
Thanks!
Rich
I’m having trouble doing anything with yum on Fedora 16. Here is the output I’m getting:
[user@mycomputer yum-3.4.3]$ sudo yum update
[sudo] password for user:
Loaded plugins: langpacks, presto, priorities, refresh-packagekit
adobe-linux-x86_64 | 39 B 00:00 ...
http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for adobe-linux-x86_64: Damaged repomd.xml file
Trying other mirror.
fedora | 39 B 00:00 ...
http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/x86_64/os/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for fedora: Damaged repomd.xml file
Trying other mirror.
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Protocol mismatch./
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-free/mirrorlist.txt
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Protocol mismatch./
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-free-updates/mirrorlist.txt
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Protocol mismatch./
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-nonfree/mirrorlist.txt
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Protocol mismatch./
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/16/rpmfusion-nonfree-updates/mirrorlist.txt
updates | 39 B 00:00 ...
http://download.fedoraproject.org/pub/fedora/linux/updates/16/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for updates: Damaged repomd.xml file
Trying other mirror.
adobe-linux-x86_64 | 39 B 00:00 ...
http://linuxdownload.adobe.com/linux/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for adobe-linux-x86_64: Damaged repomd.xml file
Trying other mirror.
Error: failure: repodata/repomd.xml from adobe-linux-x86_64: [Errno 256] No more mirrors to try
And here are the contents of my /etc/yum.conf:
[user@mycomputer yum-3.4.3]$ cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
proxy=http://xx.xx.xx.xx:xxxx
PROXY_USERNAME=user
PROXY_PASSWORD=password
And here are the contents of /etc/yum.repos.d/fedora.repo:
[user@mycomputer yum-3.4.3]$ cat /etc/yum.repos.d/fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
Does anyone have any ideas for how to fix this?
I get the following error when I execute the command yum repolist;
[root@xyz yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, langpacks
base | 2.8 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.
base/7/x86_64 | 2.8 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.
extras/7/x86_64 | 2.8 kB 00:00:00
http:// mirror.centos.org/centos/7/extras/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for extras: Damaged repomd.xml file
Trying other mirror.
updates/7/x86_64 | 2.8 kB 00:00:00
http:// mirror.centos.org/centos/7/updates/x86_64/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for updates: Damaged repomd.xml file
Trying other mirror.
repo id repo name status
base/7/x86_64 CentOS-7 - Base 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0
user3788685
2,8235 gold badges24 silver badges44 bronze badges
asked Aug 9, 2017 at 5:28
1
Yum was not configured and got resolved once configured.
answered Aug 11, 2017 at 4:27
user3168064user3168064
972 silver badges11 bronze badges
I have been getting the following error while updating yum packages.
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.
And:
[root@system ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
CentOS-7-x86_64-extras | 3.4 kB 00:00:00
CentOS-7-x86_64-os | 3.6 kB 00:00:00
CentOS-QPK-7-x86_64 | 2.5 kB 00:00:00
Delivery-Sysadm-CentOS-7-noarch | 2.5 kB 00:00:00
Delivery-Sysadm-CentOS-7-x86_64 | 2.5 kB 00:00:00
Delivery-Sysadm-CentOS-nover-noarch | 2.5 kB 00:00:00
Delivery-Sysadm-CentOS-nover-x86_64 | 2.4 kB 00:00:00
Delivery-Sysadm-nodist-nover-noarch | 2.5 kB 00:00:00
Delivery-Sysadm-nodist-nover-x86_64 | 2.5 kB 00:00:00
Private-v2cloud-CentOS-7-noarch | 2.4 kB 00:00:00
Private-v2cloud-CentOS-7-x86_64 | 2.4 kB 00:00:00
Private-v2cloud-CentOS-nover-noarch | 2.5 kB 00:00:00
Private-v2cloud-CentOS-nover-x86_64 | 2.4 kB 00:00:00
Private-v2cloud-nodist-nover-noarch | 2.5 kB 00:00:00
Private-v2cloud-nodist-nover-x86_64 | 2.5 kB 00:00:00
base | 12 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. Run the command with the repository temporarily disabled
yum --disablerepo=base ...
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 base
or
subscription-manager repos --disable=base
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=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
When I curl the mirror URL, I get the following response:
[root@system ~]# curl http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
.
.
.
Since curl is getting response, I think there is no network issues and I do not use any proxy in yum.conf
.
Any lead to fix this issue will be highly appreciated. Thanks!