Can Yum express a preference for x86_64 over i386 packages?

6,641

Set multilib_policy=best in your yum.conf, it defaults to 'all' so it installs both i386 and x86_64 packages. When you set it to 'best' it will only install i386 if there is no x86_64 version.

From the CentOS 5 yum.conf man page:

multilib_policy - Can be set to ’all’ or ’best’. All means
install all possible arches for any package you  want  to
install.  Therefore yum install foo will install foo.i386
and foo.x86_64 on x86_64, if it is available. Best  means
install the best arch for this platform, only.
Share:
6,641

Related videos on Youtube

Dan Ciborowski - MSFT
Author by

Dan Ciborowski - MSFT

Updated on September 18, 2022

Comments

  • Dan Ciborowski - MSFT
    Dan Ciborowski - MSFT over 1 year

    I run a 64-bit version of CentOS5. At the moment, when I run Yum updates or installs, unless Yum is purged of i386 packages prior, it will install i386 packages when x86_64 are available.

    Is it possible for Yum to install x86_64 packages as first preference and then if no 64-bit packages are available, install i386 packages instead?

    I know that I can set preferences so that only 64-bit packages are installed, but I don't want to do this, as it prevents 32-bit packages from being installed if they're the only option.

  • Dan Ciborowski - MSFT
    Dan Ciborowski - MSFT almost 12 years
    Ahh, okay. That sounds like the answer I'm looking for, thanks! I'd vote it up, but I don't have enough points.