Install snapd on CentOS

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

Hello,

I have some problems to install snap.
The error ois “operation now in progress” when i try “yum copr enable ngompa/snapcore-el7”

Do you have any idea ?

Thanks.

Regards,

yum copr enable ngompa/snapcore-el7

Modules complémentaires chargés : copr, fastestmirror, langpacks

You are about to enable a Copr repository. Please note that this
repository is not part of the main Fedora distribution, and quality
may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<http s://fedorahosted.org/copr/wiki/UserDocs#WhatIcanbuildinCopr>, and
packages are not held to any quality or securty level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.

Do you want to continue? [y/N]: y
Erreur : [Errno 14] curl#7 - “Failed connect to copr.fedoraproject.org:443; Opération maintenant en cours”
[root@ccdtpp ~]# yum copr enable ngompa/snapcore-el7
Modules complémentaires chargés : copr, fastestmirror, langpacks

You are about to enable a Copr repository. Please note that this
repository is not part of the main Fedora distribution, and quality
may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<http s://fedorahosted.org/copr/wiki/UserDocs#WhatIcanbuildinCopr>, and
packages are not held to any quality or securty level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.

Do you want to continue? [y/N]: y
Erreur : [Errno 14] curl#7 - “Failed connect to copr.fedoraproject.org:443; Opération maintenant en cours”

===================

#cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

Thank you @Conan_Kudo, the instructions help install snapd all the way … However facing issues installing mailspring (which required snap to be installed 1st). Following is the error in getting:

root@vps [~]# sudo snap install mailspring
error: cannot perform the following tasks:

  • Mount snap “core” (5328) ([start var-lib-snapd-snap-core-5328.mount] failed wi th exit status 1: Job for var-lib-snapd-snap-core-5328.mount failed. See “system ctl status var-lib-snapd-snap-core-5328.mount” and “journalctl -xe” for details.
    )

Would appreciate some assistance with this…

Hi Conan_Kudo – I was just wondering if there will be a build of the latest snapd for your COPR repo and CentOS 7.5? Lots of bug fixes since the 2.30 build now available. Thanks for getting this to work for everyone!

My COPR repository is no longer required to get the core snapd software. It is now part of Fedora EPEL, though it requires RHEL/CentOS 7.6 or higher.

Details are available in the official snapd EPEL updates forum topic.

1 Like