There are unfinished transactions remaining. You might consider running yum-complete-transaction...

本文介绍了解决yum安装过程中出现的警告方法,包括安装yum-utils、清除缓存及使用yum-complete-transaction清理未完成的事务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

yum命令安装程序时,总是出现如下警告:

There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.

意思是有未完成的yum事务,建议先运行yum-complete-transaction命令清除。消除警告步骤如下:

# 安装 yum-complete-transaction(这是一个能发现未完成或被中断的yum事务的程序)
yum install yum-utils
# 清除yum缓存
yum clean all
# 运行 yum-complete-transaction,清理未完成事务
/usr/sbin/yum-complete-transaction --cleanup-only

运行上述命令需要root权限。yum 会把下载的软件包和header存储在cache中,而不会自动删除。可用yum clean headers清除header,yum clean packages清除下载的rpm包,yum clean all全清

[root@node1 ~]# sudo yum update -y && sudo yum clean all 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 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). --> 正在检查事务 ---> 软件包 mysql-community-client.x86_64.0.8.0.18-1.el7 将被 升级 ---> 软件包 mysql-community-client.x86_64.0.8.0.41-1.el7 将被 更新 --> 正在处理依赖关系 mysql-community-client-plugins = 8.0.41-1.el7,它被软件包 mysql-community-client-8.0.41-1.el7.x86_64 需要 ---> 软件包 mysql-community-libs.x86_64.0.8.0.18-1.el7 将被 升级 ---> 软件包 mysql-community-libs.x86_64.0.8.0.41-1.el7 将被 更新 ---> 软件包 mysql80-community-release.noarch.0.el7-5 将被 升级 ---> 软件包 mysql80-community-release.noarch.0.el7-11 将被 更新 --> 正在检查事务 ---> 软件包 mysql-community-client-plugins.x86_64.0.8.0.41-1.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ===================================================================================================== Package 架构 版本 源 大小 ===================================================================================================== 正在更新: mysql-community-client x86_64 8.0.41-1.el7 mysql80-community 16 M mysql-community-libs x86_64 8.0.41-1.el7 mysql80-community 1.5 M mysql80-community-release noarch el7-11 mysql80-community 14 k 为依赖而安装: mysql-community-client-plugins x86_64 8.0.41-1.el7 mysql80-community 3.5 M 事务概要 ===================================================================================================== 安装 ( 1 依赖软件包) 升级 3 软件包 总计:21 M Downloading packages: 警告:/var/cache/yum/x86_64/7/mysql80-community/packages/mysql80-community-release-el7-11.noarch.rpm: 头V4 RSA
03-08
[root@VM-16-7-centos UnblockNeteaseMusic]# curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash - # 选v20 LTS版 2025-05-14 13:45:45 - Cleaning up old repositories... 2025-05-14 13:45:45 - Old repositories removed 2025-05-14 13:45:45 - Supported architecture: x86_64 2025-05-14 13:45:45 - Added N|Solid repository for LTS version: 20.x 2025-05-14 13:45:45 - yum available, updating... 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile nodesource-nodejs | 3.0 kB 00:00:00 (1/3): nodesource-nodejs/primary_db | 57 kB 00:00:01 (2/3): nodesource-nodejs/filelists_db | 615 kB 00:00:02 (3/3): nodesource-nodejs/other_db | 7.7 kB 00:00:00 元数据缓存已建立 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile nodesource-nsolid | 3.0 kB 00:00:00 (1/3): nodesource-nsolid/primary_db | 28 kB 00:00:00 (2/3): nodesource-nsolid/other_db | 2.7 kB 00:00:00 (3/3): nodesource-nsolid/filelists_db | 514 kB 00:00:02 元数据缓存已建立 2025-05-14 13:45:53 - Repository is configured and updated. 2025-05-14 13:45:53 - You can use N|solid Runtime as a node.js alternative 2025-05-14 13:45:53 - Run 'yum install nsolid -y' to complete the installation. 2025-05-14 13:45:53 - Run 'yum install nodejs -y' to complete the installation. [root@VM-16-7-centos UnblockNeteaseMusic]# sudo yum clean all && sudo yum install -y nodejs 已加载插件:fastestmirror, langpacks 正在清理软件源: epel extras nodesource-nodejs nodesource-nsolid os updates Cleaning up list of fastest mirrors 已加载插件:fastestmirror, langpacks Determining fastest mirrors epel | 4.3 kB 00:00:00 extras | 2.9 kB 00:00:00 nodesource-nodejs | 3.0 kB 00:00:00 nodesource-nsolid | 3.0 kB 00:00:00 os | 3.6 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/9): epel/7/x86_64/group | 399 kB 00:00:00 (2/9): epel/7/x86_64/updateinfo | 1.0 MB 00:00:00 (3/9): epel/7/x86_64/primary_db | 8.7 MB 00:00:00 (4/9): os/x86_64/group_gz | 153 kB 00:00:00 (5/9): extras/x86_64/primary_db | 253 kB 00:00:00 (6/9): nodesource-nodejs/primary_db | 57 kB 00:00:00 (7/9): updates/x86_64/primary_db | 27 MB 00:00:00 (8/9): os/x86_64/primary_db | 6.1 MB 00:00:01 (9/9): nodesource-nsolid/primary_db | 28 kB 00:00:01 正在解决依赖关系 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). --> 正在检查事务 ---> 软件包 nodejs.x86_64.1.16.20.2-1.el7 将被 升级 ---> 软件包 nodejs.x86_64.2.20.19.1-1nodesource 将被 更新 --> 正在处理依赖关系 glibc >= 2.28,它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libm.so.6(GLIBC_2.27)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(CXXABI_1.3.9)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.20)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.21)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libc.so.6(GLIBC_2.28)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 解决依赖关系完成 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(GLIBCXX_3.4.20)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:glibc >= 2.28 已安装: glibc-2.17-326.el7_9.3.x86_64 (@updates) glibc = 2.17-326.el7_9.3 可用: glibc-2.17-317.el7.i686 (os) glibc = 2.17-317.el7 可用: glibc-2.17-322.el7_9.i686 (updates) glibc = 2.17-322.el7_9 可用: glibc-2.17-323.el7_9.i686 (updates) glibc = 2.17-323.el7_9 可用: glibc-2.17-324.el7_9.i686 (updates) glibc = 2.17-324.el7_9 可用: glibc-2.17-325.el7_9.i686 (updates) glibc = 2.17-325.el7_9 可用: glibc-2.17-326.el7_9.i686 (updates) glibc = 2.17-326.el7_9 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libm.so.6(GLIBC_2.27)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(CXXABI_1.3.9)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libc.so.6(GLIBC_2.28)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(GLIBCXX_3.4.21)(64bit) 您可以尝试添加 --skip-broken 选项来解决该问题 ** 发现 1 个已存在的 RPM 数据库问题, 'yum check' 输出如下: mpi-selector-1.0.3-1.54310.x86_64 是 mpi-selector-1.0.3-1.51258.x86_64 的副本 [root@VM-16-7-centos UnblockNeteaseMusic]# node -v # 验证版本应≥v20.12.2 v16.20.2 [root@VM-16-7-centos UnblockNeteaseMusic]# # CentOS证书默认路径 [root@VM-16-7-centos UnblockNeteaseMusic]# export NODE_EXTRA_CA_CERTS=/etc/pki/tls/certs/ca-bundle.crt [root@VM-16-7-centos UnblockNeteaseMusic]# # 永久生效则写入~/.bashrc [root@VM-16-7-centos UnblockNeteaseMusic]# echo 'export NODE_EXTRA_CA_CERTS=/etc/pki/tls/certs/ca-bundle.crt' >> ~/.bashrc [root@VM-16-7-centos UnblockNeteaseMusic]# npm install --verbose fuse.js # 观察下载源是否为npmmirror.com -bash: npm: 未找到命令 [root@VM-16-7-centos UnblockNeteaseMusic]# curl -I https://registry.npmmirror.com # 检查返回200状态码
最新发布
05-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值