How To Resolve Yum Fails with "Error: database disk image is malformed" in /var/log/messages
This Issue is applies for:
Linux OS - Version Oracle Linux 6.0 and later
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Linux x86
Issue:
You cannot run any command related to yum and below the error messages in the / var / log / Messages file.
Incorrect configuration or damaged yum database
Error: database disk image is malformed
# yum update
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
Setting up Install Process
Ol6_latest | 3.0 kB 00:00
Ol6_latest/primary_db | 78 MB 00:10
[Errno 2] No such file or directory: '/var/cache/yum/x86_64/6Server/Ol6_latest/primary.sqlite.bz2'
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
Setting up Update Process
Ol6_latest/primary_db | 78 MB 00:10
Resolving Dependencies
--> Running transaction check
---> Package expat.x86_64 0:2.0.1-11.el6_2 will be updated
Error: database disk image is malformed
Solution for Yum Fails with error database disk image is malformed:
- Check and delete any unwanted or wrongly configured files under the path /etc/yum.repos.d/
- Run "yum clean all" command.
- Now try to perform "yum update"
Do not forget to add your valuable comments on this post.
