Error Description:
Use the Ctrl + C key combination to cancel the installation during Yum installation, then use the Yum Times error:
Error:database disk image is malformed
For example:
[email protected] etc]$ Yum repolist
Loaded Plugins:fastestmirror, security
Loading mirror speeds from cached hostfile
* base:mirrors.yun-idc.com
* extras:mirrors.yun-idc.com
* updates:mirrors.yun-idc.com
Error:database disk image is malformed
Workaround:
Perform Yum clean dbcache with root user
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1. Test using a normal user to execute the Yum Clean dbcache command is invalid
[email protected] etc]$ Yum clean dbcache
Loaded Plugins:fastestmirror, security
Cleaning Repos:base Extras Updates
4 SQLite files removed
[email protected] etc]$ Yum repolist
Loaded Plugins:fastestmirror, security
Loading mirror speeds from cached hostfile
* base:mirrors.yun-idc.com
* extras:mirrors.yun-idc.com
* updates:mirrors.yun-idc.com
Error:database disk image is malformed
2. Test using sudo is not valid
[email protected] etc]$ sudo yum clean dbcache
[sudo] password for test:
Loaded Plugins:fastestmirror, security
Cleaning Repos:base Extras Updates
5 SQLite files Removed
[email protected] etc]$ Yum repolist
Loaded Plugins:fastestmirror, security
Loading mirror speeds from cached hostfile
* base:mirrors.yun-idc.com
* extras:mirrors.yun-idc.com
* updates:mirrors.yun-idc.com
Error:database disk image is malformed
3. Switch to root user and execute again, successful
[email protected] etc]$ Su-
Password:
[email protected] ~]# Yum clean dbcache
Loaded Plugins:fastestmirror, security
Cleaning Repos:base Extras Updates
0 sqlite Files Removed
[email protected] ~]# Yum repolist
Loaded Plugins:fastestmirror, security
Determining fastest Mirrors
* base:mirrors.yun-idc.com
* extras:mirrors.yun-idc.com
* updates:mirrors.yun-idc.com
base/primary_db | 4.6 MB 00:09
extras/primary_db | Notoginseng KB 00:00
updates/primary_db | 5.2 MB 00:11
Repo ID Repo name status
Base CentOS-6-Base 6,575
Extras CentOS-6-Extras 62
Updates CentOS-6-Updates 1,622
repolist:8,259
[Email protected] ~]#
This article is from the "junight" blog, make sure to keep this source http://junight.blog.51cto.com/10828785/1774968
[Q&a]yum error ' Database disk image is malformed '