Ask Your Question
1

How to fix "sqlite3.DatabaseError: database disk image is malformed" error with yum on fedora 16?

asked 2011-11-12 06:27:37 -0600

Nirmal gravatar image

I am getting following error while installing or removing package using yum on fedora 16.

=== Downloading Packages: Running Transaction Check Running Transaction Test Transaction Test Succeeded Running Transaction Traceback (most recent call last): File "/usr/bin/yum", line 29, in <module> yummain.usermain(sys.argv[1:], exitcode=True) File "/usr/share/yum-cli/yummain.py", line 309, in usermain errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 223, in main returncode = base.doTransaction() File "/usr/share/yum-cli/cli.py", line 625, in doTransaction resultobject = self.runTransaction(cb=cb) File "/usr/lib/python2.7/site-packages/yum/init.py", line 1481, in runTransaction lastdbv = self.history.last() File "/usr/lib/python2.7/site-packages/yum/history.py", line 1148, in last ret = self.old([], 1, completetransactionsonly) File "/usr/lib/python2.7/site-packages/yum/history.py", line 1097, in old executeSQL(cur, sql, params) File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 166, in executeSQLQmark return cursor.execute(query) sqlite3.DatabaseError: database disk image is malformed

===

I tried 'yum clean all' & 'rpm --rebuilddb' to fix the issue but did not help!

edit retag flag offensive close merge delete

Comments

1
# sudo yum history new
asto gravatar imageasto ( 2011-11-12 06:44:48 -0600 )edit

many many thanks , also worked for me in F19

sergiomb gravatar imagesergiomb ( 2013-09-27 21:05:13 -0600 )edit

It worked for me on FC21. Thanks!!! :-)

After doing yum history new always is good to do a yum update.

softlibre gravatar imagesoftlibre ( 2015-01-23 08:15:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-01-24 19:21:49 -0600

alexlan gravatar image

Try running:

cd /var/lib/rpm/
sudo rm -i __db.*
sudo yum clean all
sudo yum history new
sudo yum update

This worked for me.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-11-12 06:27:37 -0600

Seen: 8,875 times

Last updated: Jan 24 '12