我无法奔跑嗯我的 Linux 机器上的命令。
我收到以下错误:
dispsim:~$ yum
Failed to set locale, defaulting to C
Loading "rhnplugin" plugin
Loading "security" plugin
error: cannot open Packages index using db3 - Invalid argument (22)
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 163, in getOptionsConfig
disabled_plugins=self.optparser._splitArg(opts.disableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 164, in _getConf
ig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 685, in readMainCo
nfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.dist
roverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 752, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
Redhat 发行版是红帽企业 Linux 服务器版本 5.2 (Tikanga)
dispsim-1:~$ uname -a
Linux dispsim 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:12 EDT 2008 i686 i686 i386 GNU/Linux
我还尝试了以下步骤:
1. su
2. rm /var/lib/rpm/__db.00*
3. rpm --rebuilddb
但这并没有解决问题。请问对此有何建议?