CentOS提示There are unfinished transactions remaining.该如何解决?

如果用yum update更新系统时出现过传输中断,很可能在后续的更新中出现这样一串提示:

There are unfinished transactions remaining. You might consider running yum-complete-transaction, 
or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. 
If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.

提示建议使用yum-complete-transaction这个程序清理未完成的传输,但是直接运行该命令会提示找不到包。这个程序在yum-utils包中,所以要先安装:

yum install yum-utils

接着清空yum缓存:

yum clean all

最后清除未完成的传输任务:

yum-complete-transaction --cleanup-only

看到以下提示说明已经解决:

Cleaning up unfinished transaction journals
Cleaning up 2021-02-06.11:49.26

此时再运行yum update返回的信息就正常了。

耕读君
耕读君

云时代的我们要学会“腾云驾雾”

文章: 185

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注