"Error: database disk image is malformed" errors in /var/log/messages file.

Solution Verified - Updated -

Issue

  • Error: database disk image is malformed errors in /var/log/messages file or when running an yumtransaction.
  • yum installs and update the package, however it returns a traceback with error database disk image is malformed
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 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 219, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 586, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1596, in runTransaction
    self.verifyTransaction(resultobject, vTcb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1684, in verifyTransaction
    self.history.sync_alldb(po)
  File "/usr/lib/python2.6/site-packages/yum/history.py", line 1346, in sync_alldb
    if not (self._wipe_anydb(ipkg, "yum") and
  File "/usr/lib/python2.6/site-packages/yum/history.py", line 1338, in _wipe_anydb
    executeSQL(cur, sql, (pid,))
  File "/usr/lib/python2.6/site-packages/yum/sqlutils.py", line 168, in executeSQLQmark
    return cursor.execute(query, params)
sqlite3.DatabaseError: database disk image is malformed

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content