yum -y upgrade升级包报错

本文记录了使用yum进行系统包升级时遇到的依赖错误及解决过程。通过使用--skip-broken参数跳过破损的依赖,并清理缓存后重新尝试升级,最终解决了gnutls、nettle等软件包的依赖冲突问题。

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

当我运行

# yum -y upgrade

升级yum包时,报错:

Loaded plugins: fastestmirror
base                                                                                                                                                                  | 3.6 kB  00:00:00     
dockerrepo                                                                                                                                                            | 2.9 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                  | 4.4 kB  00:00:00     
epel                                                                                                                                                                  | 4.3 kB  00:00:00     
extras                                                                                                                                                                | 3.4 kB  00:00:00     
updates                                                                                                                                                               | 3.4 kB  00:00:00     
(1/2): epel/x86_64/updateinfo                                                                                                                                         | 732 kB  00:00:01     
(2/2): epel/x86_64/primary_db                                                                                                                                         | 5.9 MB  00:00:16     
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be updated
---> Package epel-release.noarch 0:7-6 will be an update
---> Package jansson.x86_64 0:2.4-6.el7 will be updated
---> Package jansson.x86_64 0:2.6-1.el6 will be an update
---> Package nettle.x86_64 0:2.7.1-4.el7 will be updated
--> Processing Dependency: libhogweed.so.2()(64bit) for package: gnutls-3.3.8-14.el7_2.x86_64
--> Processing Dependency: libnettle.so.4()(64bit) for package: gnutls-3.3.8-14.el7_2.x86_64
---> Package nettle.x86_64 0:3.2-2.el6 will be an update
--> Processing Dependency: libgmp.so.3()(64bit) for package: nettle-3.2-2.el6.x86_64
---> Package qrencode-libs.x86_64 0:3.4.1-3.el7 will be updated
---> Package qrencode-libs.x86_64 0:3.4.2-1.el6 will be an update
--> Finished Dependency Resolution
Error: Package: gnutls-3.3.8-14.el7_2.x86_64 (@updates)
           Requires: libhogweed.so.2()(64bit)
           Removing: nettle-2.7.1-4.el7.x86_64 (@anaconda)
               libhogweed.so.2()(64bit)
           Updated By: nettle-3.2-2.el6.x86_64 (epel)
              ~libhogweed.so.4()(64bit)
Error: Package: gnutls-3.3.8-14.el7_2.x86_64 (@updates)
           Requires: libnettle.so.4()(64bit)
           Removing: nettle-2.7.1-4.el7.x86_64 (@anaconda)
               libnettle.so.4()(64bit)
           Updated By: nettle-3.2-2.el6.x86_64 (epel)
              ~libnettle.so.6()(64bit)
Error: Package: nettle-3.2-2.el6.x86_64 (epel)
           Requires: libgmp.so.3()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

首先执行:

# yum --skip-broken update

完成后再执行:

# yum clean all

最后重新升级:

# yum -y upgrade

提示成功

Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating   : epel-release-7-8.noarch      1/2                                                                                                                                         
Cleanup    : epel-release-7-6.noarch      2/2                                                                                                                                              
Verifying  : epel-release-7-8.noarch      1/2                                                                                                                                              
Verifying  : epel-release-7-6.noarch      2/2                                                                                                                                              

Updated:
epel-release.noarch 0:7-8                                                                                                                                                                  

Complete!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值