How do I overcome these DNF and RPM errors?
I have an installation of Fedora 22 on a removable hard disk drive (HDD) (that I always run via USB link to the same computer, if you're wondering) that used to work fine until recently (keeping in mind while it's about a week ago, it is recent to me as I only use this OS once a week or fortnight or so) when I received errors described in this question. These errors appear to be gone now but now I am getting the following errors from running sudo dnf install terminator
:
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
warning: /var/cache/dnf/i386/22/fedora/packages/terminator-0.97-6.fc21.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8e1431d5: NOKEY
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
error: db5 error(-30973) from dbenv->open: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/bin/dnf", line 36, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 185, in user_main
errcode = main(args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
return _main(base, args)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in _main
ret = resolving(cli, base)
File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
base.do_transaction()
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 216, in do_transaction
self.gpgsigcheck(downloadpkgs)
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 249, in gpgsigcheck
self.getKeyForPackage(po, fn)
File "/usr/lib/python2.7/site-packages/dnf/base.py", line 1742, in getKeyForPackage
if misc.keyInstalled(ts, info.rpm_id, info.timestamp) >= 0:
File "/usr/lib/python2.7/site-packages/dnf/yum/misc.py", line 285, in keyInstalled
for hdr in ts.dbMatch('name', 'gpg-pubkey'):
File "/usr/lib/python2.7/site-packages/dnf/rpm/transaction.py", line 58, in dbMatch
mi = self.ts.dbMatch(*args, **kwds)
_rpm.error: rpmdb open failed
Now these are just lines of output from this command that appeared to be errors to me (although they did all appear in exactly that order in the terminal, with no missing lines if you're wondering) the full output is VERY LONG and is here. If the output of the commands free -h
and uname -r
are still relevant (as was mentioned in the linked question) here they are:
free -h
:
total used free shared buff/cache available
Mem: 3.7G 755M 2.2G 134M 820M 2.8G
Swap: 3.0G 0B 3.0G
uname -r
:
4.0.4-303.fc22.i686+PAE