yum depsolving problems - package already installed?

Solution 1:

It's telling you that:

  1. It wants to upgrade freetype version 2.2.1-28.el5_5.1 — note the .1.
  2. freetype-devel 2.2.1-28.el5_5 (older version) is installed, and
  3. freetype-devel 2.2.1-28.el5_5 (older version) requires freetype 2.2.1-28.el5_5 (older version)

Since step one will remove the older version of freetype, the old freetype-devel would be left broken. So it bails out.

The question is: why isn't it trying to update freetype-devel to the new version too?

There's both i386 and x86_64 packages for both freetype and freetype-devel, so that shouldn't be causing the conflict, but, eh, sometimes things go wonky there. If you're on x86_64 and don't need the i386 package, removing it may clear things up.

But easiest thing to get working again is probably to remove freetype-devel, unless you're compiling things that link against freetype right now. After the update successfully completes, you can try and install it separately, if there's trouble there that'll be a more straightforward problem to solve.

Solution 2:

Are you on a 64 bit system? If so, you can run into odd behavior if you have both the i386 and x86_64 version of a package installed. You can try just removing the i386 freetype package, like this:

yum remove freetype.i386

This may remove additional i386 packages, but if you're on an x86_64 system this is fine. In fact, I often end up removing all the i386 packages like this:

yum remove $(rpm -qa --qf='%{NAME}-%{VERSION}.%{ARCH}\n' | grep '.i386$')

You can prevent the i386 packages from getting installed in the future by setting multilib_policy to best in /etc/yum.conf:

multilib_policy=best