LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Rpm & yum "unsupported hash version: 8" error on RHEL 5.1 (https://www.linuxquestions.org/questions/red-hat-31/rpm-and-yum-unsupported-hash-version-8-error-on-rhel-5-1-a-703238/)

Muddoll 02-08-2009 10:29 PM

Rpm & yum "unsupported hash version: 8" error on RHEL 5.1
 
I had "googled" for a week and most of them suggested to do " rpm -vv --rebuilddb", but it did not work out for me. Please kindly help me out.

rpm --version : RPM version 4.4.2

The case:
Command: rpm -qa
Error:
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
error: cannot open Packages index using db3 - Invalid argument (22)

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

/usr/lib/librpmdb-4.4.so: undefined symbol: poptSaveLong

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, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)]

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

Command: rpm -vv --rebuilddb
Error:
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.9186
D: creating directory /var/lib/rpmrebuilddb.9186
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:mpool
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: removed db environment /var/lib/rpm/Packages
D: opening db file /var/lib/rpm/packages.rpm mode 0x0
D: closed db file /var/lib/rpm/packages.rpm
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.9186

Command: cat /var/log/rpmpkgs
Error:
error: cannot open Packages index using db3 - Invalid argument (22)
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8

Sorry for the bad english, but please help to solve out this problem, thx.

unSpawn 02-09-2009 06:09 PM

Did you 'rm -f /var/lib/rpm/__db*' before you 'rpm --rebuilddb'? Can you see in your up2date, yum or syslog what happened before this error started occuring? (If up2date, check this.) Were any of rpm, rpm-libs, popt, python, rpm-python or yum recently updated? Did other errors occur replated to RPM before this one? What does 'rpm -q rpm' say? And 'file /var/lib/rpm/*'? Can you (temporarily until you fix things) overcome the /usr/lib/librpmdb-4.4.so error by downloading a copy of the popt RPM, unpacking it ('cd /tmp; rpm2cpio /tmp/popt-.*.rpm | cpio -idmv') and copying the lib in place?

Muddoll 02-09-2009 08:22 PM

Sorry For the Late reply as we may be in different time zone

Quote:

Originally Posted by unSpawn (Post 3437734)
Did you 'rm -f /var/lib/rpm/__db*' before you 'rpm --rebuilddb'?

Yes i do run rm -f /var/lib/rpm/__db*
but i am quite sure that there is "__db*" file in the folder.

Quote:

Originally Posted by unSpawn (Post 3437734)
Can you see in your up2date, yum or syslog what happened before this error started occuring? (If up2date, check this.)

# up2date
-bash: up2date: command not found =[
I think this is the first time I ran yum , rpm on this machine.

Quote:

Originally Posted by unSpawn (Post 3437734)
Were any of rpm, rpm-libs, popt, python, rpm-python or yum recently updated?

Nope.

Quote:

Originally Posted by unSpawn (Post 3437734)
Did other errors occur replated to RPM before this one?

Nope according to what i can remember.


[QUOTE=unSpawn;3437734]
What does 'rpm -q rpm' say?
[/QOUTE]
# rpm -q rpm
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
error: cannot open Packages index using db3 - Invalid argument (22)

[QUOTE=unSpawn;3437734]
And 'file /var/lib/rpm/*'?
[/QOUTE]
# ls -lrt
total 36572
-rw-r--r-- 1 rpm rpm 12288 May 12 2008 Pubkeys
-rw-r--r-- 1 rpm rpm 12288 May 12 2008 Conflictname
-rw-r--r-- 1 rpm rpm 12288 May 12 2008 Triggername
-rw-r--r-- 1 rpm rpm 45056 May 12 2008 Sigmd5
-rw-r--r-- 1 rpm rpm 90112 May 12 2008 Sha1header
-rw-r--r-- 1 rpm rpm 184320 May 12 2008 Requireversion
-rw-r--r-- 1 rpm rpm 389120 May 12 2008 Requirename
-rw-r--r-- 1 rpm rpm 81920 May 12 2008 Provideversion
-rw-r--r-- 1 rpm rpm 180224 May 12 2008 Providename
-rw-r--r-- 1 rpm rpm 26927104 May 12 2008 Packages
-rw-r--r-- 1 rpm rpm 45056 May 12 2008 Name
-rw-r--r-- 1 rpm rpm 20480 May 12 2008 Installtid
-rw-r--r-- 1 rpm rpm 24576 May 12 2008 Group
-rw-r--r-- 1 rpm rpm 5320704 May 12 2008 Filemd5s
-rw-r--r-- 1 rpm rpm 1163264 May 12 2008 Dirnames
-rw-r--r-- 1 rpm rpm 5341184 May 12 2008 Basenames

Quote:

Originally Posted by unSpawn (Post 3437734)
Can you (temporarily until you fix things) overcome the /usr/lib/librpmdb-4.4.so error by downloading a copy of the popt RPM, unpacking it ('cd /tmp; rpm2cpio /tmp/popt-.*.rpm | cpio -idmv') and copying the lib in place?

downloaded "popt-1.10.2-48.el5.i386.rpm" and followed your advice but
it did not seem like working. =[

unSpawn 02-10-2009 02:19 AM

Quote:

Originally Posted by Muddoll (Post 3437833)
I think this is the first time I ran yum , rpm on this machine.

Please tell us something about the general state of the machine then. Is this a fresh install? Was there another admin before you? When was the last time stuff got installed with RPM OK? Do you keep a backup schedule? How far back do they go?


Quote:

Originally Posted by Muddoll (Post 3437833)
Nope according to what i can remember.

If you manage multiple servers "remembering" gets tricky. Keeping a log of things helps. If you don't have a log, maybe check out whatever syslog/application logs you have instead?


Quote:

Originally Posted by Muddoll (Post 3437833)
Quote:

Originally Posted by unSpawn (Post 3437734)
And 'file /var/lib/rpm/*'?

# ls -lrt
total 36572

Realise 'file' does not equal 'ls'? Besides it's darn odd all timestamps are similar.


Quote:

Originally Posted by Muddoll (Post 3437833)
downloaded "popt-1.10.2-48.el5.i386.rpm" and followed your advice but it did not seem like working.

I'm sorry but "did not seem like working" doesn't show me the steps you tried and any resulting (error) messages.

vinaystyle 02-12-2009 05:40 AM

dear user you are not configure properly yum on your linux system
use yum of you linux version.It solve your problem.





thank for your question


All times are GMT -5. The time now is 07:57 AM.