In order to repair the RPM database, I ran rpm --rebuild
. Afterward, I cannot find any package using rpm -qa
, and yum
does not work,as the logs below show.
[root@local03 ~]# yum
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 294, in user_main errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 115, in main base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 228, in getOptionsConfig self.conf
File "/usr/lib/python2.6/site-packages/yum/init.py", line 910, in conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/init.py", line 299, in _getConfig startupconf = config.readStartupConfig(fn, root)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 892, in readStartupConfig startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 1043, in _getsysver hdr = idx.next() StopIteration
[root@local03 ~]# rpm -aq | grep bash
[root@local03 ~]#
rpm -qa
doesn't return anything, then it sounds to me like you initialized your RPM database. Might be time to restore from backups./etc/yum/yum.conf
look normal.