Chinaunix首页 | 论坛 | 博客
  • 博客访问: 232092
  • 博文数量: 86
  • 博客积分: 5030
  • 博客等级: 大校
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-30 16:36
文章分类

全部博文(86)

文章存档

2010年(86)

我的朋友

分类: LINUX

2010-04-15 15:54:54

自动更新错误,internal error。
用 yum,提示错误:
=============================================
rpmdb: Thread/process 28879/3086964416 failed: Thread died in Berkeley DB library
error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30975)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
    errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 84, in main
    base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
    enabled_plugins=self.optparser._splitArg(opts.enableplugins))
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 192, in _getConfig
    self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 774, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 844, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
===============================================

yum 错误TypeError: rpmdb open failed
===============================
解决办法
是因为RPM数据库出现损坏导致的,它导致所有的软件的升级、安装甚至是删除都会出现问题,终端出现乱码,YUMEX也用不成,RPM命令也用不成。原因是RPM数据库被破坏,解决方法如下:
$ su            切换到root权限
# cd /var/lib/rpm/
# for i in `ls | grep 'db.'`;do mv $i $i.bak;done
# rpm --rebuilddb     重建该数据库
# yum clean all

===============================
阅读(886) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~