My team wants to test our snap out on Red Hat since many of our Linux users are on that. So, I’ve been trying to spin up a test machine. Been having trouble with the installation steps as defined in the documentation (https://snapcraft.io/docs/installing-snap-on-red-hat). Some details about my setup:
Red Hat 8 with trial subscription
Machine is a HyperV Gen 2 VM
Steps and results:
sudo rpm ... succeeds
sudo subscription-manager repos ... fails with the following errors:
Error: 'rhel-*-optional-rpms' does not match a valid repository ID...
Error: 'rhel-*-extras-rpms' doesn not match a valid repository ID...
sudo yum install snapd fails with the following errors:
Problem 1: cannot install the best update candidate for package annobin-8.64-1.el8.x86_64
- nothing provides librpm.so.3()(64bit) needed by annobin-8.64-1.el8.x86_64
- nothing provides librpmio.so.3()(64bit) needed by annobin-8.64-1.el8.x86_64
Problem 2: cannot install the best update candidate for package libidn2-2.0.5-1.el8.x86_64
- nothing provides libunistring.so.0()(64bit) needed by libidn2-2.0.5-1.el8.x86_64
Running the command again with --nobest reports the same errors but appears to complete successfully.
sudo yum install snapd fails with the following errors:
Problem: package snapd-2.39.2-1.el7.x86_64 requires snapd-selinux = 2.39.2-1.el7, but none of the providers can be installed
- conflicting requests
- nothing provides policycoreutils-python needed by snapd-selinux = 2.39.2-1.el7.noarch
The `--nobest` option does not work.
At this point, I’m stuck… I’m going to try installing directly onto bare metal, but we’ll see. I haven’t had problems with VMs before with other distros installing snapd or installing and running our snap.
Update: Tried with a bare metal machine, and same problem. New to Red Hat, but is this a subscription issue? Do trial subscriptions not have access to those repos?
These errors look like your RHEL installation isn’t yet registered. Unfortunately, however, there’s another issue blocking the installation of snapd on RHEL 8 - it’s not yet in the EPEL 8 repository (I’ll update the docs to include this).
There is a post on building snapd manually for RHEL 8, but that’s obviously a more time consuming (and ambitious) method:
I’m not a Red Had Linux expert, but I’m pretty sure my machine is registered. I open the subscription manager, and it says my subscription is current (complete with Unregister button).
Building snapd simply isn’t an option. That’s not what our users should be expected to do. Is RHEL 8 pretty new? Is snapd available for 7.*?
Except the EPEL repo for RHEL 7 isn’t updated as frequently as one would like. It’s still only providing 2.39.2 from June at the moment, which means it doesn’t have important things like the SELinux policy updates from 2.39.3, let alone the improvements/fixes from the three major releases since then.
Well, there’s nothing we could have done though. The real issue was with koji/bodhi https://pagure.io/releng/issue/8676 Now that it finally got fixed, we should be able to push updates for EPEL7 again.
Thanks for the update. The new packages are now in EPEL 8, and I’ve updated the RHEL docs accordingly. I’ll do the same for CentOS 8 (you might want to try them out, @craxal).
Hi, I try to install snapd on my centos 8 and there currently the same problem with dependency to newer version of snapd-selinux-2.42.1-1.el8.noarch. So if you can pls fix it for centos too. Thx.
Problem: package snapd-2.42.1-1.el8.x86_64 requires snapd-selinux = 2.42.1-1.el8, but none of the providers can be installed