Install snapd on CentOS

I get error when installing on Ubuntu
sudo apt install snapd
The error is
Unable to locate package snapd

@AdamIsrael It’s a good question. I would also appreciate having a more clear view of what the current state is and what the upcoming steps should be. @Conan_Kudo Do you have any idea of how this would look like today?

@manikabedi This topic is mainly about CentOS support. Please open a different topic with more details about the issue you are facing so we can try to help.

So, CentOS 7.4 just went out last week, so I’m going to start poking at the rebased Go and SELinux stack and see if things don’t blow up on me like they did before…

2 Likes

Is there any progress on the CentOS support?

My initial tests were better than before, but there were still some glitches. I may be able to provide a COPR repository for testing at some point in the coming days for broader testing.

2 Likes

Testing packages are now available from my COPR repository.

To install with full GNOME Software integration, here are the following steps:

# Install the COPR plugin and EPEL
$ sudo yum install yum-plugin-copr epel-release
# Enable this repo
$ sudo yum copr enable ngompa/snapcore-el7
# Install snapd
$ sudo yum install snapd
# Enable snapd.socket
$ sudo systemctl enable --now snapd.socket
# Install GNOME Software snap plugin, note that GNOME Software gets replaced in this step
$ sudo yum install gnome-software-snap

Feedback on the packages would be greatly appreciated.

3 Likes

I’ll give this a try :smiley:

It fails on lack of squashfuse and policycoreutils-python-utils

EDIT: Wti the new epel-release package I’m only missing policycoreutils-poython-utils.

This should be fixed now, with the new build of snapd.

I got into selinux problems with startup of snapd-login-service but otherwise things do work OK. I tried spotify (installed from command line) and slack. I’ll continue testing.

EDIT: some more selinux woes.

Works great for us!

We just setup a test runner for Centos 7 using your snapd packages and now have automated testing of LXD on Centos 7 on all channels and tracks.

Getting the kernel on Centos 7 to behave with user namespaces is always entertaining (because that keeps changing somehow), but once you have the right set of boot parameters and sysctls, everything works fine.

1 Like

https://jenkins.linuxcontainers.org/job/lxd-test-snap-latest-edge/dist=centos-7,restrict=snapd/lastBuild/console

For the latest result for the LXD snap in the latest track and edge channel.

@stgraber

How those jenkist builds can be downloaded ? Is there rpm repo for CentOS 7 ?

Jenkins validates that the LXD snap works on Centos 7.
There are no RPMs for LXD on Centos, only the snap.

Installation instructions for the LXD snap on Centos 7 can be found here:
https://discuss.linuxcontainers.org/t/lxd-on-centos-7/1250

How do I install newest snapd for CentOS 7 ? So I can install snap packages after that?

Is this still newest?

I’m on el 7.5 and here’s what I get on the last step:
sudo yum install gnome-software-snap
Loaded plugins: copr, enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
rhel-7-server-extras-rpms | 2.0 kB 00:00:00
rhel-7-server-optional-rpms | 2.0 kB 00:00:00
rhel-7-server-rpms | 2.0 kB 00:00:00
rhel-7-server-satellite-tools-6.2-rpms | 2.1 kB 00:00:00
Resolving Dependencies
–> Running transaction check
—> Package gnome-software-snap.x86_64 0:3.22.7-3.el7.centos.1 will be installed
–> Processing Dependency: gnome-software(x86-64) = 3.22.7-3.el7.centos.1 for package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64
–> Processing Dependency: snapd-login-service for package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64
–> Processing Dependency: libsnapd-glib.so.1()(64bit) for package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64
–> Running transaction check
—> Package gnome-software-snap.x86_64 0:3.22.7-3.el7.centos.1 will be installed
–> Processing Dependency: gnome-software(x86-64) = 3.22.7-3.el7.centos.1 for package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64
—> Package snapd-glib.x86_64 0:1.29-0.el7.centos.1 will be installed
—> Package snapd-login-service.x86_64 0:1.29-0.el7.centos.1 will be installed
–> Finished Dependency Resolution
Error: Package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64 (ngompa-snapcore-el7)
Requires: gnome-software(x86-64) = 3.22.7-3.el7.centos.1
Installed: gnome-software-3.22.7-5.el7.x86_64 (@anaconda/7.5)
gnome-software(x86-64) = 3.22.7-5.el7
Available: gnome-software-3.14.7-2.el7.x86_64 (rhel-7-server-rpms)
gnome-software(x86-64) = 3.14.7-2.el7
Available: gnome-software-3.22.7-1.el7.x86_64 (rhel-7-server-rpms)
gnome-software(x86-64) = 3.22.7-1.el7
Available: gnome-software-3.22.7-3.el7.centos.1.x86_64 (ngompa-snapcore-el7)
gnome-software(x86-64) = 3.22.7-3.el7.centos.1


Dependency resolving failed due to missing dependencies.
Some repositories on your system are disabled, but yum can enable them
and search for missing dependencies. This will require downloading
metadata for disabled repositories and may take some time and traffic.


Enable all repositories and try again? [y/N]: y
rhel-atomic-host-rpms/x86_64 | 2.3 kB 00:00:00
rhel-atomic-host-rpms/x86_64/group | 130 B 00:00:00
rhel-atomic-host-rpms/x86_64/updateinfo | 23 kB 00:00:00
rhel-atomic-host-rpms/x86_64/primary | 58 kB 00:00:00
rhel-atomic-host-rpms 191/191
rhel-server-rhscl-7-rpms/7Server/x86_64 | 2.0 kB 00:00:00
rhel-server-rhscl-7-rpms/7Server/x86_64/group | 130 B 00:00:00
rhel-server-rhscl-7-rpms/7Server/x86_64/updateinfo | 803 kB 00:00:01
rhel-server-rhscl-7-rpms/7Server/x86_64/primary | 2.8 MB 00:00:04
rhel-server-rhscl-7-rpms 9429/9429
rhel-7-server-supplementary-rpms/7Server/x86_64 | 2.0 kB 00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/group | 33 kB 00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/updateinfo | 58 kB 00:00:00
rhel-7-server-supplementary-rpms/7Server/x86_64/primary | 85 kB 00:00:00
rhel-7-server-supplementary-rpms 255/255
rhel-7-server-rh-common-rpms/7Server/x86_64 | 2.1 kB 00:00:00
rhel-7-server-rh-common-rpms/7Server/x86_64/group | 130 B 00:00:00
rhel-7-server-rh-common-rpms/7Server/x86_64/updateinfo | 32 kB 00:00:00
rhel-7-server-rh-common-rpms/7Server/x86_64/primary | 66 kB 00:00:00
rhel-7-server-rh-common-rpms 231/231
–> Running transaction check
—> Package gnome-software-snap.x86_64 0:3.22.7-3.el7.centos.1 will be installed
–> Processing Dependency: gnome-software(x86-64) = 3.22.7-3.el7.centos.1 for package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64
–> Finished Dependency Resolution
Error: Package: gnome-software-snap-3.22.7-3.el7.centos.1.x86_64 (ngompa-snapcore-el7)
Requires: gnome-software(x86-64) = 3.22.7-3.el7.centos.1
Installed: gnome-software-3.22.7-5.el7.x86_64 (@anaconda/7.5)
gnome-software(x86-64) = 3.22.7-5.el7
Available: gnome-software-3.14.7-2.el7.x86_64 (rhel-7-server-rpms)
gnome-software(x86-64) = 3.14.7-2.el7
Available: gnome-software-3.22.7-1.el7.x86_64 (rhel-7-server-rpms)
gnome-software(x86-64) = 3.22.7-1.el7
Available: gnome-software-3.22.7-3.el7.centos.1.x86_64 (ngompa-snapcore-el7)
gnome-software(x86-64) = 3.22.7-3.el7.centos.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager

I have not usually installed that GNOME Software Integration, I don’t know does it work at all.

Without that step, I could install for example Wekan snap like this:

Unfortunately, I can’t yet fix this until CentOS 7.5 is available, since I need to rebuild against the EL7.5 environment to fix it. Hopefully, it should be available before the end of the month.

I forgot about the lag from RHEL to CentOS releases. In any case, I was still able to install Snap and then was able to install Hiri (a great e-mail client with solid MS Exchange support, btw). The manual install for Hiri failed so Snap let me try out an application I would have otherwise given up on. As @xet7 mentioned, the Gnome integration is not essential.

Thanks!
Daniel