Centos 5.5 and bad marshal data

After downloading Centos 5.5 i386 DVD and doing a fresh install on a VM I encountered this error:

Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in ?
    import yum
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 30, in ?
    import logging
ValueError: bad marshal data

I tried replacing yum and yum-fastestmirror by rpms to no avail. I would have tried replacing python itself but that will really break my system.

What solved my problem was the solution outlined by mnx solutions[1]. It involved deleting some corrupted python runtime included in python’s packaging.

Run rpm verification on the python package.

# rpm -Va python
.M...U..    /usr/lib/python2.4/aifc.py
..5.....    /usr/lib/python2.4/logging/__init__.pyc

Delete the .pyc for logging.

# rm /usr/lib/python2.4/logging/__init__.pyc

Reference:
[1] http://www.mnxsolutions.com/linux/yum-python-logger-error-bad-marshal-data.html

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.