Subject: apparmor: systemd-detect-virt: not found

From: Lars Noodén <[email-masked]>
Date: Sat, 4 Aug 2018 12:20:51 +0300

Package: apparmor
Version: 2.11.0-3+deb9u2

apparmor has a systemd dependency which causes it to fail to start.  The
package causing the problem, systemd-detect-virt, claims to be able to
detect execution in a virtualized environment as well as distinguishing
full machine virtualization from container virtualization.

https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html

# /etc/init.d/apparmor restart
/etc/init.d/apparmor: 182: /etc/init.d/apparmor: systemd-detect-virt:
not found
Reloading AppArmor profiles:AppArmor not available as kernel LSM..
 failed!

# dpkg -S /etc/init.d/apparmor
apparmor: /etc/init.d/apparmor

# apt-cache policy apparmor
apparmor:
  Installed: 2.11.0-3+deb9u2
  Candidate: 2.11.0-3+deb9u2
  Version table:
 *** 2.11.0-3+deb9u2 500
        500 http://fi.deb.devuan.org/merged ascii/main amd64 Packages
        100 /var/lib/dpkg/status