2011-12-22

Yum headaches

After a yum update on a workstation, I've found the root mailbox full of messages like this:

/etc/cron.daily/0logwatch:
Undefined subroutine &main::TimeBuild called at /etc/cron.daily/0logwatch line 846.
}
{


The yum itself had problems:

# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   cannot import name RpmUtilsError

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Apr 14 2011, 20:42:01)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq

I've reinstalled yum

rpm -iv yum-3.2.22-37.el5.noarch.rpm rpm-python-4.4.2.3-22.el5.i386.rpm rpm-4.4.2.3-22.el5.i386.rpm
rpm-apidocs-4.4.2.3-22.el5.i386.rpm rpm-build-4.4.2.3-22.el5.i386.rpm rpm-devel-4.4.2.3-22.el5.i386.rpm rpm-libs-4.4.2.3-22.el5.i386.rpm

and yum was back in action, but there were other problems:
with an rpm -qa I looked at the installed packages and they appeared to be less than usual.
For example there was no mkinitrd package installed but the mkinitrd command was right there.
Probably the rpm database was corrupted but an

# rpm --rebuilddb

sorted no different effect.
I did an rpm -qa on a similarly configured workstation and compared it with the rpm -qa of this machine: there were more than 140 rpms missing.
I extracted the missing list and reinstalled all of them with a big yum install command

# yum install \
NetworkManager \
NetworkManager-glib \
NetworkManager-gnome \
a2ps \
at-spi \
at-spi-devel \
autofs \
avahi \
avahi-compat-libdns_sd \
...and 140 more...




No comments:

Post a Comment