Skip to main content

Install specific version and arch, without specifying the release [Resolved]

Assume I want to install the glibc-devel package with version 2.17 and i686 arch. Assume I don't care about the specific release.

Assume as well that this is being run from a script, such that yum --showduplicates list and similar solutions are not possible.

  • If I did not care about the arch, I could run yum install glibc-devel-2.17 and I would get the current release for the 2.17 version of glibc-devel with the x86_64 arch.
  • If I did not care about the version, I could run yum install glibc-devel.i686 and get the most recent version and release of glibc-devel with the i686 arch.

But if I try to run yum install glibc-devel-2.17.i686 yum tells me that No package glibc-devel-2.17.i686 available..

How can I constrain both the version and the arch of a package, without knowing the actual release?

(glibc-devel is only an example, this is a generic question)

Question Credit: gcscaglia
Question Reference
Asked September 19, 2019
Posted Under: Unix Linux
1 Answers

You should be able to use globs:

yum install glibc-devel-2.17-*.i686

yum only supports architecture specifications combined with either only a package name, or a full version and release (and optionally, epoch).

With dnf, you could use the --arch or --forcearch options instead.

credit: Stephen Kitt
Answered September 19, 2019
Your Answer