LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   yum error (https://www.linuxquestions.org/questions/linux-software-2/yum-error-504081/)

raim1312 11-22-2006 09:11 PM

yum error
 
i recently installed fc6 64 and had used yum several times to install packages. i then installed jdk and attempted to edit the classpath but i probably messed up with the syntax because when i restarted my computer x wouldnt start. so i removed the line and everything seemed fine. but now when i try to use yum i get this error:

Loading "installonlyn" plugin
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30977)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
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 199, in getOptionsConfig
errorlevel=opts.errorlevel)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 125, in doConfigSetup
self.conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 597, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 656, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

can somebody help me?

vxc69 11-22-2006 09:27 PM

Try:
rm -f /var/lib/rpm/__db*
db_verify /var/lib/rpm/Packages
rpm --rebuilddb



vxc

raim1312 11-22-2006 10:30 PM

i get this when using "db_verify /var/lib/rpm/Packages":

bash: db_verify: command not found

is there an alternative?

also i tried rpm --rebuilddb and got this:

rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30977)

vxc69 11-22-2006 11:06 PM

Quote:

Originally Posted by raim1312
i get this when using "db_verify /var/lib/rpm/Packages":

bash: db_verify: command not found

is there an alternative?

also i tried rpm --rebuilddb and got this:

rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30977)


rm -f /var/lib/rpm/__db*

The command above has two underscores in it _ _db*. If it still doesn't work it doesn't look good.

raim1312 11-23-2006 09:41 AM

db_verify still doesnt work but rpm --rebuilddb did work and yum is working again. thank you


All times are GMT -5. The time now is 04:39 PM.