简体   繁体   English

尝试安装 snapd 但给出“冲突请求”错误

[英]Try to install snapd but giving `conflicting requests` error

I am trying to install snapd but giving this error.我正在尝试安装 snapd 但出现此错误。

Operating System - Red Hat Enterprise Linux release 8.6 (Ootpa)操作系统 - Red Hat Enterprise Linux release 8.6 (Ootpa)

Error: 
 Problem: package snapd-2.57.6-2.el8.x86_64 requires snapd-selinux = 2.57.6-2.el8, but none of the providers can be installed
  - conflicting requests
  - nothing provides selinux-policy >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
  - nothing provides selinux-policy-base >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I have the same problem.我也有同样的问题。 There's a long discussion about this here: https://forum.snapcraft.io/t/trouble-installing-snapd-on-rhel-8/13140/2 .这里对此进行了长时间的讨论: https://forum.snapcraft.io/t/trouble-installing-snapd-on-rhel-8/13140/2 It looks like the only way to do it, if you can install all the necessary build tools, is to build from sources, as one of the posts there suggests.(I couldn't do it on my system because it's having subscription management issues.)如果您可以安装所有必要的构建工具,那么看起来唯一的方法就是从源代码构建,正如那里的一篇帖子所建议的那样。(我无法在我的系统上这样做,因为它存在订阅管理问题.)

I also tried using CR repository, as suggested in the instructions for CentOS here: https://snapcraft.io/docs/installing-snap-on-centos , but that didn't work for me, either (I guess it's really just for CentOS and not RHEL).我也尝试使用 CR 存储库,如此处 CentOS 的说明中所建议: https://snapcraft.io/docs/installing-snap-on-centos ,但这对我也不起作用(我想它真的只是对于 CentOS 而不是 RHEL)。

UPDATE:更新:

I finally found a solution (where there's a will...), I manually installed all the requirements, one by one, that weren't available in the epel-release repo.我终于找到了一个解决方案(有意愿......),我手动安装了所有要求,一个一个地安装了epel-release库中没有的要求。 My process was the following:我的过程如下:

wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-4.14.3-19.el8.x86_64.rpm
wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-libs-4.14.3-19.el8.x86_64.rpm
wget https://dl.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/Packages/s/selinux-policy-3.14.3-108.el8.noarch.rpm

sudo rpm -i --force rpm-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force rpm-libs-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force selinux-policy-3.14.3-108.el8.noarch.rpm

sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libsemanage-2.9-9.el8.x86_64.rpm --allowerasing
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libsemanage-2.9-9.el8.x86_64.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-2.9-19.el8.x86_64.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-policycoreutils-2.9-19.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-python-utils-2.9-19.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/selinux-policy-minimum-3.14.3-108.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.2-1.el8.x86_64.rpm

sudo yum update snapd

Or, if you're installing from scratch:或者,如果您从头开始安装:

sudo yum install snapd-2.57.6-2.el8.x86_64

It's conceivable that I've left something out in that list, or perhaps that on your system something else will be missing.可以想象我在该列表中遗漏了一些东西,或者可能在您的系统上缺少其他东西。 If you run into an error telling you that nothing provides package XYZ, you can find it here: https://centos.pkgs.org/8-stream/centos-baseos-x86_64/ and simply sudo yum install directly from the binary package URL;如果你遇到错误告诉你没有提供 package XYZ,你可以在这里找到它: https://centos.pkgs.org/8-stream/centos-baseos-x86_64/并且直接从二进制 package sudo yum install URL; eg:例如: 示例二进制包链接

That's exactly what my process was, and here's what I have now:这正是我的过程,这就是我现在所拥有的:

$ cat /etc/redhat-release                                                                                                                                                                                                                                                                                                                                                                                          (base)
Red Hat Enterprise Linux release 8.2 (Ootpa)
$ snap --version                                                                                                                                                                                                                                                                                                                                                                                                   (base)
snap    2.57.6-2.el8
snapd   2.52.1
series  16
rhel    8.2
kernel  4.18.0-193.6.3.el8_2.x86_64

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM