以前 RPM YUM 等命令都能用的,安装wireshark 之后,RPM YUM 等命令都不能用了。以下是报错提示
[root@luqiwen Packages]# rpm -ivh lua-5.1.4-4.1.el6.i686.rpm
rpmdb: /var/lib/rpm/Packages: unexpected file type or format
error: cannot open Packages index using db3 - 无效的参数 (22)
error: cannot open Packages database in /var/lib/rpm
warning: lua-5.1.4-4.1.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
rpmdb: /var/lib/rpm/Packages: unexpected file type or format
error: cannot open Packages database in /var/lib/rpm
[root@luqiwen Packages]# yum -y install lua-5.1.4-4.1.el6.i686.rpm
rpmdb: /var/lib/rpm/Packages: unexpected file type or format
error: cannot open Packages index using db3 - 无效的参数 (22)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 88, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 192, in getOptionsConfig
self.conf
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 256, in _getConfig
startupconf = config.readStartupConfig(fn, root)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 835, in readStartupConfig
startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 968, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
_rpm.error: rpmdb open failed
rpm db坏掉简败闷了,重建吧
删枯陵除临时DB文拦弯件: rm -fv /var/lib/rpm/__*
rebuild rpm DB: rpm --rebuilddb -v -v
能联网的话直接update一下试试,将所有的都进行一下更新