当前位置:   article > 正文

Centos7安装snapd关于Error: Package: snapd-selinux-2.47.1-1.el7.noarch Requires: selinux-policy-base >= 3_finished dependency resolution error: package: sel

finished dependency resolution error: package: selinux-policy-mls-3.13.1-266

安装可能遇到的问题


--> Running transaction check
---> Package fuse-libs.x86_64 0:2.9.2-11.el7 will be installed
---> Package libzstd.x86_64 0:1.4.5-3.el7 will be installed
---> Package snapd-selinux.noarch 0:2.47.1-1.el7 will be installed
--> Processing Dependency: selinux-policy-base >= 3.13.1-268.el7 for package: snapd-selinux-2.47.1-1.el7.noarch
---> Package squashfuse-libs.x86_64 0:0.1.102-1.el7 will be installed
--> Finished Dependency Resolution
Error: Package: snapd-selinux-2.47.1-1.el7.noarch (epel)
           Requires: selinux-policy-base >= 3.13.1-268.el7
           Installed: selinux-policy-minimum-3.13.1-266.el7_8.1.noarch (@updates)
               selinux-policy-base = 3.13.1-266.el7_8.1
           Installed: selinux-policy-targeted-3.13.1-266.el7_8.1.noarch (@updates)
               selinux-policy-base = 3.13.1-266.el7_8.1
           Available: selinux-policy-minimum-3.13.1-266.el7.noarch (base)
               selinux-policy-base = 3.13.1-266.el7
           Available: selinux-policy-mls-3.13.1-266.el7.noarch (base)
               selinux-policy-base = 3.13.1-266.el7
           Available: selinux-policy-mls-3.13.1-266.el7_8.1.noarch (updates)
               selinux-policy-base = 3.13.1-266.el7_8.1
           Available: selinux-policy-targeted-3.13.1-266.el7.noarch (base)
               selinux-policy-base = 3.13.1-266.el7
 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
  • 20
  • 21
  • 22
  • 23
  • 24

遇到问题的原因,错误信息已经给的很明确了,** selinux-policy-base >= 3.13.1-268.el7 **依赖的版本要大于3.13.1.268,本机安装的是266版本

解决方案

通过rpm安装包的方式安装更新版本的依赖

1.移除旧版selinux-policy , 否则直接安装会导致冲突

yum remove selinux-policy
  • 1

2.去rpm仓库下载对应的依赖文件

wget ftp://ftp.pbone.net/mirror/ftp.centos.org/7.9.2009/os/x86_64/Packages/selinux-policy-3.13.1-268.el7.noarch.rpm
 
wget ftp://ftp.pbone.net/mirror/ftp.centos.org/7.8.2003/cr/x86_64/Packages/selinux-policy-targeted-3.13.1-268.el7.noarch.rpm

  • 1
  • 2
  • 3
  • 4

3.安装对应依赖

[root@localhost ~]rpm -ivh selinux-policy-3.13.1-268.el7.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:selinux-policy-3.13.1-268.el7    ################################# [100%]
[root@localhost ~]rpm -ivh selinux-policy-targeted-3.13.1-268.el7.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:selinux-policy-targeted-3.13.1-26################################# [100%]

## 注意要先安装 selinux-policy  否则会产生如下错误
error: Failed dependencies:
        selinux-policy = 3.13.1-268.el7 is needed by selinux-policy-targeted-3.13.1-268.el7.noarch

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

4.安装snapd

yum -y install snapd
  • 1

综上,即可成功安装snapd。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/581354
推荐阅读
相关标签
  

闽ICP备14008679号