Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 9 down vote accepted

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|improve this answer
Ahh, okay. That sounds like the answer I'm looking for, thanks! I'd vote it up, but I don't have enough points. –  James Jun 28 '12 at 7:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.