2

I am tring to install X11 server on a RHEL6 server

yum groupinstall "X Window System" "Desktop" "Fonts"

but I am getting the following error:

Error Downloading Packages:
  libart_lgpl-2.3.20-5.1.el6.x86_64: failed to retrieve getPackage/libart_lgpl-2.3.20-5.1.el6.x86_64.rpm from prod-epel-x86_64-server-6
error was [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=prod-epel-x86_64-server-6 clean metadata

After running the yum --enablerepo=prod-epel-x86_64-server-6 clean metadata command, I am receiving the same error message.

How can I fix this?

Mokus
  • 412
  • 1
  • 11
  • 20

3 Answers3

3

The error keeps coming back because it's using a mirror that is probably not fully sync'ed. So the package does not match the MD5 hash.

You can try to specify a different mirror or use yum-fastestmirror plugin so it detects the fastest one automatically.

EDIT

gtirloni
  • 5,746
  • 3
  • 25
  • 52
  • I installed that plugin, and I run yum clean all, yum upgrade but I am getting the same error. – Mokus Aug 15 '14 at 12:16
  • Your EPEL repository might be configured to use just one specific server. Go to /etc/yum.repos.d and edit the file for the "prod-epel-x86_64-server-6" repository. Check if there is a line with "mirrorlist=" and uncomment it. Comment out the "baseurl=" parameter. Then repeat the `yum clean all` and try to update again. – gtirloni Aug 15 '14 at 12:24
  • I have only `rhel-source.repo` file under that folder – Mokus Aug 15 '14 at 12:34
  • It seems EPEL is not being enabled in the standard way (through a repo configuration file) in your machine. It's probably enabled on-the-fly by some plugin. Unfortunately I don't have access to a RHEL6 system right now but if you've a support contract you can access the following URL to learn how to tweak the configuration for EPEL in any way that RedHat decided to do it for RHEL subscripters: https://access.redhat.com/solutions/3358. Additionally, you could reinstall EPEL configuration following the standard process. – gtirloni Aug 15 '14 at 12:48
2

usually deleting the yum cache solves the problem, try these commands:

yum clean all 
yum upgrade 

and then try to install X11. Also this can indicate a problem with the repo itself which in that case you need to specify the mirror you want to use in the yum conf file

[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.usc.edu/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

Cheers.

kokoto
  • 156
  • 3
1

You should not need any EPEL to install the "X Window System" pkg group. (the repositories provided to you by your Red Hat Subscription should be enough)

Furthermore, the error you recieve could be an error on the client end, but it could also indicate that something is wrong in the yum repo you are using: I don't know what software have created the "prod-epel-x86_64-server-6", but it could indicate a duplicate (ie two packages with same name exists in same repo) or else the pkg changed since repo was created. (maybe metadata was generated before the package completely was updated to repo or something).

Anyway, since you should not need this repo to install the "X Window System" pkg group, I think you should do this:

 yum clean all
 yum --disablerepo "prod-epel-86_64-server-6" groupinstall "X Window System" "Desktop" "Fonts"

And then make a more thorough examination about what is going on with the "prod-epel-86_64-server-6" repo. If it is in your control, you could try regenerating metadata for it.

Petter H
  • 3,443
  • 1
  • 16
  • 19
  • In this case I am receiving the following error: `Error getting repository data for prod-epel-86_64-server-6, repository not found` – Mokus Aug 15 '14 at 13:24
  • That is surprising if the metadata was cleaned before running the cmd – Petter H Aug 15 '14 at 15:28