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?