#1108358 “apparmor_parser”: executable file not found in $PATH

Package:
apparmor
Source:
apparmor
Description:
user-space parser utility for AppArmor
Submitter:
Patricio Rojo
Date:
2025-07-08 09:03:01 UTC
Severity:
normal
Tags:
#1108358#5
Date:
2025-06-26 18:56:32 UTC
From:
To:
While trying to run snap I get the following error:

"""
cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exec: "apparmor_parser": executable file not found in $PATH
apparmor_parser output:
]
"""

the easy solution is to manually add /usr/sbin to /etc/environment, but I doubt is the correct approach and it is hard to find that solution.  I hope I'm submitting the bug to the right package.

Thanks!

#1108358#10
Date:
2025-06-27 05:55:25 UTC
From:
To:
Hi Patricio,

* Patricio Rojo <ss2@wasabi.das.uchile.cl> [2025-06-26 14:56]:

Can you give more detailed instructions how to reproduce this?

Do you mean snap as in /usr/bin/snap from the snapd package or a
specific snap?

This works for me in a fresh trixie VM:

sudo install snap
sudo snap install hello-world
hello-world

Cheers Jochen

#1108358#17
Date:
2025-06-27 22:13:56 UTC
From:
To:
Dear Jochen,

Thanks for the quick reply. Indeed, it was the same I did (but running
in bookworm):

sudo install snap
sudo snap install core

**** error: cannot communicate with server: Post
"http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect:
connection refused
--- Then, after an exhaustive search I found that the problem appeared with apparmor service failed to initiate as explained originally, after adding /usr/sbin to /etc/environment the problem disappeared. However(!), the plot thickens as I just deleted /usr/sbin from /etc/environment to try getting the error again, but it didn't reappear.  So,  my guess is that the correct path is now stored somewhere in the profiles thanks to apparmor-utils?
--- Anyways, I cannot reproduce anymore in my system :s. Thanks!    Pato
#1108358#22
Date:
2025-06-28 06:15:18 UTC
From:
To:
* Patricio Rojo <pato@das.uchile.cl> [2025-06-27 18:13]:

nit: sudo apt install snapd

I can't reproduce this on bookworm either.

That sounds unlikely, you can check your system with:

dpkg --verify

It should show modifications to the apparmor profiles.

Given that we both can't reproduce the problem, do you agree to
downgrade the bug to normal?

Cheers Jochen

#1108358#27
Date:
2025-06-29 19:20:00 UTC
From:
To:
Hi Jochen,

   I'll be happy to try helping digging up the root of the error and
agree with the change of severity.

   This is the relevant output of 'dpkg --verify' grepping for snap or app:

missing  /usr/share/dbus-1/services/io.snapcraft.Prompt.service
??5?????? c /etc/apparmor.d/usr.sbin.ntpd
??5?????? c /etc/apparmor.d/usr.sbin.mysqld
missing     /var/cache/app-info
missing     /var/cache/app-info/xmls

   Let me know about anything else you might need.


        Pato

#1108358#32
Date:
2025-06-29 19:27:56 UTC
From:
To:
* Patricio Rojo <pato@das.uchile.cl> [2025-06-29 15:20]:

That seems all not relevant to your assumption that apparmor-utils
changed.

I am a bit out of ideas here, so leaving this to the apparmor
maintainer.

Cheers Jochen

#1108358#39
Date:
2025-07-08 09:00:07 UTC
From:
To:
Hi,

Jochen Sprickerhof (2025-06-29):

I'm out of ideas too :/

Without a way to reproduce the bug or more information about the
system state at the time the bug occurred, I'm afraid this bug report
is not going to be actionable.

Cheers,