LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-08-2009, 10:29 PM   #1
Muddoll
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
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.

Last edited by Muddoll; 02-08-2009 at 10:33 PM.
 
Old 02-09-2009, 06:09 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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?
 
Old 02-09-2009, 08:22 PM   #3
Muddoll
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Sorry For the Late reply as we may be in different time zone

Quote:
Originally Posted by unSpawn View Post
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 View Post
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 View Post
Were any of rpm, rpm-libs, popt, python, rpm-python or yum recently updated?
Nope.

Quote:
Originally Posted by unSpawn View Post
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 View Post
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. =[
 
Old 02-10-2009, 02:19 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Muddoll View Post
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 View Post
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 View Post
Quote:
Originally Posted by unSpawn View Post
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 View Post
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.
 
Old 02-12-2009, 05:40 AM   #5
vinaystyle
LQ Newbie
 
Registered: Feb 2009
Location: Dehradun
Distribution: REDHAT LINUX 6.0
Posts: 7
Blog Entries: 2

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected "Unsupported protocol: HTTPS" error in Apache/PHP/curl bions Linux - Server 6 11-29-2010 10:51 AM
"Failed Dependency error" while installing RPM for "DateTime" perl modules giridhargopal.cj Linux - Newbie 7 11-19-2008 12:05 AM
Error with GTK2.0: "clearlooks" unsupported? polemon Linux - Newbie 2 10-13-2005 05:52 PM
connecting openbsd to linux nfs mount - "unsupported protocol" error animehair *BSD 4 03-28-2005 01:21 AM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration