[Q&A]yum报错‘database disk image is malformed’

错误描述:

在yum安装软件的过程中使用 Ctrl + c 组合键取消安装,之后再使用yum时报错:

Error: database disk image is malformed

例如:

[[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

解决方法:

以root用户执行 yum clean dbcache

×××××××××××××××××××××××××××××××××××××××××××××

1.测试使用普通用户执行 yum clean dbcache 命令无效

[[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.测试使用sudo无效

[[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.切换到root用户再执行,成功

[[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                                        |  37 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] ~]#

[Q&A]yum报错‘database disk image is malformed’

时间: 2024-08-25 10:05:59

[Q&A]yum报错‘database disk image is malformed’的相关文章

yum安装出现Error: database disk image is malformed报错

使用yum安装gcc命令时,电脑意外重启,恢复虚拟机后再次使用yum安装gcc出现报错信息 Error: database disk image is malformed 报错原因是之前意外结束安装进程之前已经产生了缓存 使用yum重新安装的时候首先要清除缓存,使用yum clean all命令 yum clean all 清除yum缓存,使用yum安装软件包时yum把下载的软件包和header存储在cache中,进程意外中断后之前下载的内容不会自动删除,我们需要先清空缓存后再重新下载.当然,如

yum报错的问题

可能是因为重复安装了curl .7.45 ,导致yum报错: /usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback 网上看到是动态库冲突,按网上说的如下操作: [[email protected] ~]# ldd /usr/lib64/python2.6/site-packages/pycurl.so linux-vdso.so.1 => (0x00007fff677

解决 yum Error: database disk image is malformed

问题出现: [[email protected] ~]# yum -y install screen Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirror.bit.edu.cn * updates: mirror.bit.edu.cn Error: database disk image is malformed 解决办

rhel yum报错

用yum报错 http://mirrors.aliyun.com/centos/%24releasever/addons/x86_64/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out> Trying other mirror. http://mirrors.aliyuncs.com/centos/%24releasever/addons/x86_64/repodata/repomd.xml: [Errno 14

搭建仓库,yum报错无签署问题

在centos系统中使用yum报错 yum install xxx.rpm warning: Package xxx.rpm is not signed google一下,解决方法都是 1.修改yum.conf 路径:/etc/yum.conf 找到 gpgcheck=1 将其修改为0:gpgcheck=0 2.修改/etc/yum.repos.d /utterramblings.repo 找到 gpgcheck=1 将其修改为0:gpgcheck=0 如果不行 只要在在后面加上--nogpgc

yum报错setup has installed conflicts filesystem &lt; (&#39;0&#39;, &#39;3&#39;, None): filesystem

yum安装出现以下错误: Error: Depsolving loop limit reached. Error: Package: cloog-ppl-0.15.7-1.2.el6.x86_64 (@anaconda-CentOS-201508042137.x86_64/6.7) Requires: libgmp.so.3()(64bit) Removing: gmp-4.3.1-7.el6_2.2.x86_64 (@anaconda-CentOS-201508042137.x86_64/6.

解决yum报错:UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode ... ordinal not in range

在使用yum部署环境的时候,出现了报错: UnicodeDecodeError: 'ascii' codec can't decode ... ordinal not in range 解决办法: [[email protected] ~]# ll /var/lib/rpm/*db*-rw-r--r-- 1 root root 73728 Aug 15 14:52 /var/lib/rpm/__db.001-rw-r--r-- 1 root root 270336 Aug 15 14:52 /v

Yum database disk image is malformed 错误 解决办法

yum install xxx 时出现: database disk image is malformed 解决办法:yum clean dbcache

Centos7.0安装python2.7后yum报错

yum报错: vi /usr/libexec/urlgrabber-ext-down 把头部的Python改成和/usr/bin/yum中一样的