Score:2

Snap/Apparmor stopped working in Ubuntu 22.04

fr flag

I can no longer update snap apps on Ubuntu 22.04. If I try to refresh firefox I get:

$ sudo snap refresh firefox
error: cannot perform the following tasks:
- Setup snap "firefox" (2277) security profiles (cannot setup profiles for snap "firefox": cannot load apparmor profiles: exec: "apparmor_parser": executable file not found in $PATH
apparmor_parser output:
)

Even downloading basic Hello World gets me:

$ sudo snap install hello-world
error: cannot perform the following tasks:
- Setup snap "core" (14447) security profiles (cannot setup profiles for snap "core": cannot create host snap-confine apparmor configuration: cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exec: "apparmor_parser": executable file not found in $PATH
apparmor_parser output:
)

Snap used to work fine then suddenly stopped with these issues. My versions are:

$ snap --version
snap    2.57.6
snapd   2.57.6
series  16
ubuntu  22.04
kernel  5.15.0-58-generic

$ apparmor_parser --version
AppArmor parser version 3.0.4
Copyright (C) 1999-2008 Novell Inc.
Copyright 2009-2018 Canonical Ltd.

I checked that the apparmor_parser executable is reachable from $PATH and it is:

$ which apparmor_parser
/usr/sbin/apparmor_parser
$ echo "$PATH"
/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin:/snap/bin:/home/user/.local/bin

At this point I am out of ideas what the problem is and how I can fix it. I tried reinstalling everything but it still did not solve the issue. Can anyone please help?

Mnemosyne avatar
fr flag
uninstalled snap and apparmor. cleared up any caches left. then reinstalled. Nothing changed.
Score:1
cn flag

had the same issue. fixed it by reinstalling AppArmor (and rebooting)

sudo apt reinstall --purge apparmor
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.