System

How to fix yum error: database disk image is malformed

Yum-and-RPM---Red-Hat,-Centos If you encounter “Error: database disk image is malformed” when using yum to install or update a package, as shown below:


[[email protected] ~]# yum install ruby
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirror1.ku.ac.th
 * epel: mirror1.ku.ac.th
 * extras: mirror1.ku.ac.th
 * updates: mirror1.ku.ac.th
Error: database disk image is malformed

Fix it by running:


[[email protected] ~]# yum clean dbcache

or


[[email protected] ~]# yum clean all
EOF.← Back to articles