LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-12-2007, 02:41 PM   #1
HopefulStock
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
pirut


Hello,
I recently installed Fedora Core 8, everything was fine and then I decided to update the system to install more rpms. After the install, pirut crashed, and gave an error message:

Component: pirut
Summary: TBc0c9275d config.py:680:_getsysver:TypeError: rpmdb open failed

Traceback (most recent call last):
File "/usr/sbin/pirut", line 476, in <module>
main()
File "/usr/sbin/pirut", line 469, in main
pm = PackageManager(options.config, options.onlyrepo)
File "/usr/sbin/pirut", line 63, in __init__
GraphicalYumBase.__init__(self, False, config)
File "/usr/lib/python2.5/site-packages/pirut/__init__.py", line 129, in __init__
plugin_types=(yum.plugins.TYPE_CORE,))
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 113, in doConfigSetup
errorlevel=errorlevel)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 159, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 613, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 680, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

Local variables in innermost frame:
installroot: /
ts: <rpmUtils.transaction.TransactionWrapper instance at 0x9a37eac>
distroverpkg: redhat-release

I tried to run rpm, and rpm gave me the following error:

rpmdb: /var/lib/rpm/Packages: file size not a multiple of the pagesize
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

I thought then that rpm database became corrupted. So I tried removing the Packages database file ( renamed it to different file name ) and ran rpmdb --initdb, rpmdb --rebuilddb ( I am guessing here, and trying to avoid a re-install. )

I tried running yum clean all and got the following error:

Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 154, in getOptionsConfig
disabled_plugins=opts.disableplugins)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 159, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 613, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 686, in _getsysver
hdr = idx.next()
StopIteration

So is there hope of recovering from this, or should I go ahead and re-install ?
Thanks.
 
Old 11-12-2007, 03:00 PM   #2
HopefulStock
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I recently tried changing the code in: /usr/lib/python2.5/site-packages/yum/config.py (line 686)
(FROM)
~~
else:
hdr = idx.next()
releasever = hdr['version']
del hdr
~~
(TO)

~~
else:
#hdr = idx.next()
#releasever = hdr['version']
#del hdr
releasever='8'
~~
i.e., commented out the line that was causing the python script to crash,
and then hardcoding the releasever to be 8.
I can now run yum and did a "clean all".
This now allows me to run pirut, but the thing is, it doesn't
know about any of the installed packages. I guess the rpm Package database is unusable at this point.

So is there a way for recovering information regarding all software
packages actually installed on the system ?

Last edited by HopefulStock; 11-12-2007 at 03:11 PM. Reason: Update status since submission.
 
  


Reply

Tags
fc8, pirut, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Pirut will not prompt for next cd doublejoon Red Hat 0 09-18-2007 12:50 PM
Can I remove Pirut? Chargh Fedora 1 08-11-2007 05:57 AM
Pirut or Yumex? linexnal Linux - Newbie 1 07-14-2007 09:56 PM
pirut problem eugen.serban Fedora 2 04-27-2007 04:16 AM
problem with pirut the_gripmaster Fedora 1 02-24-2007 09:28 PM


All times are GMT -5. The time now is 06:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration