CentOS 的 YUM安装时卡死解决方案

问题:
在使用yum安装时,卡死并且无法Ctrl+c终止,需要将其杀死才能停止。
如下图:When using yum to install, it is stuck and cannot be terminated by Ctrl+c. You need to kill it to stop.

解决办法:

    删除rpm数据文件后再重建rpm数据文件:

    Rebuild the rpm data file after deleting the rpm data file:

    删除rpm数据文件

    Delete rpm data file

rm -f /var/lib/rpm/__db.00*

重建rpm数据文件

Rebuild rpm data file

rpm -vv --rebuilddb

清空缓存后再重新缓存

Re-cache after clearing the cache

yum clean all 
yum makecache

然后删除下列两个文件就可以了

 

posted @ 2021-06-21 13:33  John_2011  阅读(499)  评论(0)    收藏  举报