I just tested it, and you’re right - I’ve updated the text. Thank you!
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
Could you tell us which version of openSUSE you’re using and I’ll give it a go. Thanks.
UPDATE: I apologize, I spoke too soon, I fixed the issue, for some reason my repositories had system:/snappy/openSUSE_Leap_15.0 set for snappy instead of openSUSE_Tumbleweed
For anyone else having trouble, I was able to fix the issue by listing, removing and adding the correct repository with
zypper lr -d
replace 13 with the # listed for snappy
sudo zypper rr 13
and then update properly with the correct Tumbleweed repo URL
sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed snappy
sudo zypper dup --from snappy
sudo systemctl enable snapd.apparmor.service
I’ve been getting the same for a while now, I first noticed it about a month ago and have gotten it with every update since and I update regularly, running OpenSUSE Tumbleweed
The following product is going to be upgraded:
openSUSE Tumbleweed 20190214-0 -> 20190219-0
(143/143) Installing: snapd-2.37.3-lp150.1.1.x86_64 ...................................................................................................................................................................................................................................[done]
Additional rpm output:
Please reboot, logout/login or source /etc/profile to have /snap/bin added to PATH.
On a Tumbleweed system you need to run: systemctl enable snapd.apparmor.service
brbfapping@dagobah:~> systemctl enable snapd.apparmor.service
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
brbfapping@dagobah:~> sudo systemctl enable snapd.apparmor
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
here, snapd.service is installed & up (?), but there’s no trace of snapd.apparmor.service
lsb_release -rd
Description: openSUSE Leap 15.0
Release: 15.0
zypper lr Snappy
Alias : Snappy
Name : Snappy
URI : https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.0
Enabled : Yes
GPG Check : (r ) Yes
Priority : 99 (default priority)
Autorefresh : On
Keep Packages : Off
Type : rpm-md
GPG Key URI :
Path Prefix :
Parent Service :
Keywords : ---
Repo Info Path : /etc/zypp/repos.d/Snappy.repo
MD Cache Path : /var/cache/zypp/raw/Snappy
zypper dup --from Snappy
zypper install snapd
rpm -qa | grep -i snapd
snapd-2.37.4-lp150.1.1.x86_64
systemctl enable snapd
systemctl enable snapd.apparmor
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
systemctl list-units --all | grep -i snap | grep service
snapd.failure.service loaded inactive dead Failure handling of the snapd snap
snapd.service loaded active running Snappy daemon
systemctl status snapd -l
● snapd.service - Snappy daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/snapd.service.d
└─override.conf
Active: active (running) since Mon 2019-03-25 16:09:15 PDT; 5s ago
Main PID: 8269 (snapd)
Tasks: 10 (limit: 9830)
CGroup: /system.slice/snapd.service
└─8269 /usr/lib/snapd/snapd
Mar 25 16:09:14 dev04.lan snapd[8269]: AppArmor status: apparmor not enabled
Mar 25 16:09:14 dev04.lan snapd[8269]: daemon.go:379: started snapd/2.37.4-lp150.1.1 (series 16; classic; devmode) opensuse-leap/15.0 (amd64) linux/5.0.3-lp150.6.g2a31831-de.
Is that^^ still current instruction, and a dependency has changed? Is there additional install step required?
Those are applicable only to openSUSE Tumbleweed for now. We believe that once the snapd package migrates to the openSUSE repository it will also not be needed because snapd will be added to the system presets package, which will enable appropriate services automatically.
Hey, sorry for bumping but I assume this is the topic for suggesting changes to this page. I think you could replace the
$ sudo systemctl enable snapd
$ sudo systemctl start snapd
with
$ sudo systemctl enable --now snapd
instead.
Citing the systemctl man page: Note that this does not have the effect of also starting any of the units being enabled. If this is desired, combine this command with the --now switch, or invoke start with appropriate arguments later.
Thanks.
Hello, and yes, this is exactly the right topic for suggesting changes! And I think you’re right - a single line is easier to copy and it’s still clear what’s going on. I’ll update the doc - thank you!
I just installed Leap 15.2 and I’ve tried everything I’ve seen here including all the suggestions but I’m unable to get snap to work. I see it is installed but I cannot start it.
sudo systemctl enable --now snapd produces: “Job for snapd.service failed because the control process exited with error code. …”
Trying the solution offered above, sudo systemctl enable snapd.apparmor, I get “Failed to enable unit: Unit file snap.apparmor.service does not exist.”
Yet when I rerun zypper install snapd, I get “…‘snapd’ is already installed. No update candidate for ‘snapd-2.48.2-lp152.1.1.x86_64’. The highest available version is already installed.”
Sorry you’re having problems - I’ve just followed the instructions on a fresh Leap 15.2 install (in an x86 VM) and everything worked as expected.
Could you try sudo journalctl --no-pager -u snapd
and snap version
? For reference, here’s the output from the system I just installed:
$ sudo journalctl --no-pager -u snapd
[sudo] password for root:
-- Logs begin at Wed 2021-01-20 10:59:47 GMT, end at Wed 2021-01-20 11:19:40 GMT. --
Jan 20 10:59:49 localhost systemd[1]: Starting Snap Daemon...
Jan 20 10:59:50 localhost snapd[994]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network
Jan 20 10:59:50 localhost snapd[994]: daemon.go:347: started snapd/2.48.2-lp152.1.1 (series 16; classic; devmode) opensuse-leap/15.2 (amd64) linux/5.3.18-lp152.19-default.
Jan 20 10:59:50 localhost snapd[994]: daemon.go:440: adjusting startup timeout by 40s (pessimistic estimate of 30s plus 5s per snap)
Jan 20 10:59:50 localhost systemd[1]: Started Snap Daemon.
Jan 20 11:03:32 localhost.localdomain snapd[994]: api.go:1007: Installing snap "snap-store" revision unset
Jan 20 11:05:46 localhost.localdomain snapd[994]: storehelpers.go:551: cannot refresh: snap has no updates available: "core", "core18", "gnome-3-34-1804", "gtk-common-themes", "hello-world", "snap-store"
$ snap version
snap 2.48.2-lp152.1.1
snapd 2.48.2-lp152.1.1
series 16
opensuse-leap 15.2
kernel 5.3.18-lp152.19-default
Can you double check whether apparmor is installed in your system? On my Tumbleweed system I have the following packages:
maciek@sloop:~ rpm -qa apparmor\* | sort
apparmor-abstractions-3.0.1-1.2.noarch
apparmor-docs-3.0.1-1.2.noarch
apparmor-parser-3.0.1-1.2.x86_64
apparmor-parser-lang-3.0.1-1.2.noarch
apparmor-profiles-3.0.1-1.2.noarch
apparmor-rpm-macros-1.0-6.3.noarch
apparmor-utils-3.0.1-1.2.noarch
apparmor-utils-lang-3.0.1-1.2.noarch
I guess zypper in apparmor-parser
should be enough to pull in the right dependencies. Although it’s a bit weird why those would be missing from your system, since the snapd explicitly requires the apparmor-parser
package.
I show it installed but when this is where I cannot go further:
bryan@OpenSUSE Leap:~> sudo systemctl enable --now snapd.apparmor
Failed to enable unit: Unit file snapd.apparmor.service does not exist.
bryan@OpenSUSE Leap:~> rpm -qa apparmor* | sort
apparmor-abstractions-2.13.4-lp152.2.3.1.noarch
apparmor-docs-2.13.4-lp152.2.3.1.noarch
apparmor-parser-2.13.4-lp152.2.3.1.x86_64
apparmor-parser-lang-2.13.4-lp152.2.3.1.noarch
apparmor-profiles-2.13.4-lp152.2.3.1.noarch
apparmor-utils-2.13.4-lp152.2.3.1.noarch
apparmor-utils-lang-2.13.4-lp152.2.3.1.noarch
Sorry, I didn’t notice you are using Leap. Something is not quite right though, the package is built without AppArmor support in Leap, the instructions about enabling snapd.apparmor provided in earlier posts apply to Tumbleweed only.
Can you paste the output of journalctl -u snapd --no-pager
?
bryan@OpenSUSE Leap:~> journalctl -u snapd --no-pager
Hint: You are currently not seeing messages from other users and the system.
Users in the ‘systemd-journal’ group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
Can you try adding sudo
? i.e. sudo journalctl -u snapd --no-pager
Just a heads up, I’ve proposed snapd 2.53.1 to the openSUSE repositories. Since Leap 15.3 has more recent packages, I have enabled AppArmor during the build. This means that once the package lands in the repository, the sudo systemctl enable --now snapd.apparmor
step will apply to both Tumbleweed and 15.3+.
I think we should tweak the instructions to provide first and foremost the commands for installation on Tumbleweed. That’s where we have most users, and I suspect folks often make a mistake of not replacing 15.3 with Tumbleed as the text below the command example states. Perhaps the paragraph does not stand out as much as it should, specially when viewed through Installing snap on openSUSE | Snapcraft documentation where it’s just gray on light gray, no admonition or anything like that.
Also, 15.3 is EOL, the current release if 15.5.
Given the above, perhaps we should have a separate paragraph for Tumbleweed and Leap, each with a header such that they stand out a little bit more. WDYT?
That makes complete sense, yes - I think you’re right, and having two separate paragraphs is a good idea too. I’ll fix the text.
I noticed in the instructions that the zypper repo for Tumbleweed has a typo. It should read https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed
instead. This was verified on a freshly installed VM.