Gerard Braad

F/OSS & IT Consultant on Openness and Interoperability

You can follow more frequent updates via my Identi.ca profile (feed).

Tuesday, August 25, 2009

Accidently installed i386 packages on x86_64?

If you have a CentOS installation (or Fedora) running as x86_64 architecture, be sure to install your packages with yum using the following command:

$ yum install [packagename].x86_64

This way you will specify the architecture to use. If you do not specify the architecture you might end up installing both the x86_64 and the i386 packages with all it's dependencies.

If you have already done so in error, you can easily query for these packages using the following command:

$ rpm -qa --qf '%{name}.%{ARCH}\n' |grep i386

this command returns all i386 packages. You can pipe it directly into rpm -e or choose to uninstall them by hand.

2 comments:

Greg said...

you can also set this to default behavior in yum by adding this to /etc/yum.conf:

multilib_policy=best


Then if you want to install ix86 packages, you have to define the arch, but for x86_64 you don't have to.

gbraad said...

Every install of CentOS comes with openssl.i686 which causes a lot of i386 packages to be installed by default :-s.

Followers