• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Article / Linux/Unix/BSD / Yum sqlite database disk image is malformed error

Yum sqlite database disk image is malformed error

When trying to install something this morning using yum on a CentOS 5 machine, I got the error message “_sqlite.DatabaseError: database disk image is malformed” as shown below:

$ yum install vsftpd
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
base                      100% |=========================| 1.1 kB    00:00
updates                   100% |=========================|  951 B    00:00
centosplus                100% |=========================|  951 B    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 381, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 134, in doCommand
    return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 539, in installPkgs
    self.doRepoSetup()
  File "/usr/share/yum-cli/cli.py", line 109, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 341, in doSackSetup
    self.pkgSack.excludeArchs(archlist)
  File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 331, in excludeArchs
    sack.excludeArchs(archlist)
  File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 587, in excludeArchs
    cur.execute(querystring)
  File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 244, in execute
    self.rs = self.con.db.execute(SQL)
_sqlite.DatabaseError: database disk image is malformed

This is easy to fix by issuing the following command:

yum clean allAfter running this I got the following message, and I was able to install software again using Yum:

Loading "installonlyn" plugin
Cleaning up Everything
This error could happen on any Linux distribution that uses Yum for package management, such as Red Hat Enterprise Linux, CentOS 5, Fedora and its derivatives.

Check Out These Related posts:

  1. Installing maildrop on CentOS 5
  2. Install PHP without Apache on Debian
  3. New_Face failed error when using Mplayer
  4. Yum error Metadata file does not match checksum

Filed Under: Linux/Unix/BSD

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap