YUM安装提示--skip-broken-to-work-around-the-problem
文章发布较早,内容可能过时,阅读注意甄别。
有时候本地 yum 源可能被玩坏了,然后在安装一些软件的时候就会报如下错误:
[root@localhost yum.repos.d]$yum -y update
Resolving Dependencies
--> Running transaction check
---> Package cryptsetup-libs.x86_64 0:1.7.4-4.el7 will be updated
---> Package cryptsetup-libs.x86_64 0:2.0.3-3.el7 will be an update
---> Package device-mapper.x86_64 7:1.02.146-4.el7 will be updated
--> Processing Dependency: device-mapper = 7:1.02.146-4.el7 for package: 7:device-mapper-event-1.02.146-4.el7.x86_64
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be an update
---> Package device-mapper-libs.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be an update
--> Finished Dependency Resolution
Error: Package: 7:device-mapper-event-1.02.146-4.el7.x86_64 (@base)
Requires: device-mapper = 7:1.02.146-4.el7
Removing: 7:device-mapper-1.02.146-4.el7.x86_64 (@base)
device-mapper = 7:1.02.146-4.el7
Updated By: 7:device-mapper-1.02.149-10.el7_6.2.x86_64 (bash)
device-mapper = 7:1.02.149-10.el7_6.2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
网上大多数的说法都是重新建立以下缓存,但是如果 yum 源出问题了,那么重建也是没用的。
解决办法如下:
yum install -y epel-release
1
安装 epel,然后再执行相关的缓存重建,安装就可以了。
$ yum clean all
$ yum update
1
2
2
上次更新: 2024/11/19, 23:11:42