Centos7安装snapd关于Error: Package: snapd-selinux-2.47.1-1.el7.noarch Requires: selinux-policy-base >= 3

安装可能遇到的问题


--> 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

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

解决方案

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

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

yum remove selinux-policy

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

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

4.安装snapd

yum -y install snapd

综上,即可成功安装snapd。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值