Recently, I started getting this error when running any yum

[root@edge root]# yum install php
Gathering package information from servers
Getting headers from: Yellow Dog Linux 3.0 base
Getting headers from: Yellow Dog Linux 3.0 updates
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
error: cannot open Packages index using db3 - Invalid argument (22)
Traceback (most recent call last):
File "/usr/bin/yum", line 44, in ?
File "yummain.py", line 145, in main
File "clientStuff.py", line 146, in rpmdbNevralLoad
File "clientStuff.py", line 139, in openrpmdb
NameError: global name 'RpmError' is not defined

After a little searching, I've seen other people with this problem
after running rpm --rebuilddb, which I also did a while ago. Does
anyone know how to get yum back in shape? I haven't made any changes
to yum.conf since it last worked successfully, so I don't think it's a
config problem there.