[CentOS] Promlem with broken yum/rpm

Wed Sep 23 14:33:29 UTC 2009
Filipe Brandenburger <filbranden at gmail.com>

Hi,

On Tue, Sep 22, 2009 at 23:00, Peter Beck <peter at limbec.com> wrote:
> I have lost/corrupted the libraries related to the expat package. This has
> caused rpm and yum to stop working effectively stopping my ability to manage
> my server.
>
> Btw rpm crashes with exactly the same message.

Do you mean that when you run "rpm -Uvh somepackage.rpm" or even "rpm
-qa" you get the message "libexpat.so.0: cannot open shared object
file: No such file or directory"? That is weird, because as far as I
can tell (using "ldd") the binary for "rpm" is not linked to libexpat
at all... It also does not seem to be in the dependencies of "rpm".
Could you run the "rpm -q rpm" command and copy and paste the exact
output of it here?

A little more information about your problem would help, for instance,
what version of CentOS (4 or 5) are you running, and what is the
architecture (i386 or x86_64) of your machine? Could you please post
the exact output of the command "uname -mri" here?

One option to recover from this kind of issues is to boot the machine
in rescue mode using a CentOS install CD or the LiveCD and reinstall
the expat RPM from there. Do you have a CentOS install CD at hand that
you could use to do that?

HTH,
Filipe