[Q&a]yum error ' Database disk image is malformed '

Source: Internet
Author: User
Tags sqlite yum repolist

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 '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.