The officially official Devuan Forum!

You are not logged in.

#1 2024-07-06 21:55:36

webman
Member
Registered: 2022-08-27
Posts: 45  

How to repair APPARMOR?

Hello!

After I had some problems with KMV - in this context I saw apparmor errors
about KVM - I thought to remove apparmor temporarely. The docs does not
show me, how to disable (tried: /etc/init.d/apparmor stop), so I uninstalled it.
But the errors (while starting a VM) continue.
So I re-installed apparmor and another pain begins, which my bootlog shows (datetime column removed):

 Starting: AppArmorLoading AppArmor profiles...AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/usr.bin.man at line 53: Could not open 'local/usr.bin.man'
 AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper at line 75: Could not open 'local/usr.lib.libvirt.virt-aa-helper'
 AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/usr.sbin.libvirtd at line 144: Could not open 'local/usr.sbin.libvirtd'
 AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/sbin.dhclient at line 74: Could not open 'local/sbin.dhclient'
 AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/usr.sbin.ntpd at line 86: Could not open 'local/usr.sbin.ntpd'
 AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/usr.bin.tcpdump at line 68: Could not open 'local/usr.bin.tcpdump'
 Error: Could not load profile /var/cache/apparmor/201d1af9.0/lsb_release: File exists
 Error: Could not load profile /var/cache/apparmor/201d1af9.0/lightdm-guest-session: File exists
 AppArmor parser error for /etc/apparmor.d/sbin.dhclient in profile /etc/apparmor.d/sbin.dhclient at line 74: Could not open 'local/sbin.dhclient'
 Error: Could not load profile /var/cache/apparmor/201d1af9.0/nvidia_modprobe: File exists
 Error: Could not load profile /var/cache/apparmor/201d1af9.0/usr.bin.lxc-start: File exists
 AppArmor parser error for /etc/apparmor.d/usr.bin.man in profile /etc/apparmor.d/usr.bin.man at line 53: Could not open 'local/usr.bin.man'
 AppArmor parser error for /etc/apparmor.d/usr.bin.tcpdump in profile /etc/apparmor.d/usr.bin.tcpdump at line 68: Could not open 'local/usr.bin.tcpdump'
 AppArmor parser error for /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper in profile /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper at line 75: Could not open 'local/usr.lib.libvirt.virt-aa-helper'
 AppArmor parser error for /etc/apparmor.d/usr.sbin.libvirtd in profile /etc/apparmor.d/usr.sbin.libvirtd at line 144: Could not open 'local/usr.sbin.libvirtd'
 AppArmor parser error for /etc/apparmor.d/usr.sbin.ntpd in profile /etc/apparmor.d/usr.sbin.ntpd at line 86: Could not open 'local/usr.sbin.ntpd'
 Error: Could not load profile /var/cache/apparmor/201d1af9.0/lxc-containers: File exists
 /sbin/apparmor_parser: Unable to add "/usr/bin/lxc-start".  Profile already exists
 /sbin/apparmor_parser: Unable to add "lsb_release".  Profile already exists
 /sbin/apparmor_parser: Unable to add "kmod".  Profile already exists
 /sbin/apparmor_parser: Unable to add "nvidia_modprobe".  Profile already exists
 /sbin/apparmor_parser: Unable to add "chromium".  Profile already exists
 /sbin/apparmor_parser: Unable to add "/usr/lib/x86_64-linux-gnu/lightdm/lightdm-guest-session".  Profile already exists
 /sbin/apparmor_parser: Unable to add "lxc-container-default".  Profile already exists
 At least one profile failed to load ... failed!
 failed.

I do not know, why this hapens and how to repair it!

Thanks,
Manfred

Offline

#2 2024-07-07 05:35:19

Dutch_Master
Member
Registered: 2018-05-31
Posts: 281  

Re: How to repair APPARMOR?

Try

rm -rf /var/cache/apparmor/201d1af9.0

This should clear the cache files apparmor is complaining about.

Offline

#3 2024-07-07 20:53:21

webman
Member
Registered: 2022-08-27
Posts: 45  

Re: How to repair APPARMOR?

Thanks!

Was not the whole truth so, but probably the most important pointer!
Had to remove everything named apparmor so,
the boot was error-free and new install too!

Regards,
Manfred

Offline

Board footer