Apparmor 启动失败,命令行启动,结果与以下相同
x@x-NICEPUTER:~$ systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● apparmor.service loaded failed failed LSB: AppArmor initialization
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
x@x-NICEPUTER:~$ systemctl status apparmor.service
● apparmor.service - LSB: AppArmor initialization
Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2016-05-03 21:52:29 MDT; 1h 15min ago
Docs: man:systemd-sysv-generator(8)
Process: 523 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)
May 03 21:52:22 x-NICEPUTER apparmor[523]: AppArmor parser error for /etc/apparmor.d/usr.bin.webbrowser-app in /etc/apparmor.d/usr.bin.webbrowser-app at line 26: Could not open '/usr/share/apparmor/hardware/graphics.d'
May 03 21:52:28 x-NICEPUTER apparmor[523]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
May 03 21:52:29 x-NICEPUTER apparmor[523]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
May 03 21:52:29 x-NICEPUTER apparmor[523]: AppArmor parser error for /etc/apparmor.d/usr.bin.webbrowser-app in /etc/apparmor.d/usr.bin.webbrowser-app at line 26: Could not open '/usr/share/apparmor/hardware/graphics.d'
May 03 21:52:29 x-NICEPUTER apparmor[523]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
May 03 21:52:29 x-NICEPUTER apparmor[523]: ...fail!
May 03 21:52:29 x-NICEPUTER systemd[1]: apparmor.service: Control process exited, code=exited status=123
May 03 21:52:29 x-NICEPUTER systemd[1]: Failed to start LSB: AppArmor initialization.
May 03 21:52:29 x-NICEPUTER systemd[1]: apparmor.service: Unit entered failed state.
May 03 21:52:29 x-NICEPUTER systemd[1]: apparmor.service: Failed with result 'exit-code'.
目录apparmor/hardware/
和文件graphics.d
不存在 /usr/share/
因此#include /usr/share/apparmor/hardware/graphics.d
在第 26 行/etc/apparmor.d/usr.bin.webbrowser-app
返回 null 并导致失败。
我怎样才能正确解决这个问题,或者至少创建一个允许apparmor.service
初始化而不会失败的解决方法?
uname -a
Linux x-NICEPUTER 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
sudo lshw
[sudo] password for x:
x-niceputer
description: Computer
width: 64 bits
capabilities: smbios-2.4 vsyscall32
*-core
description: Motherboard
physical id: 0
*-memory
description: System memory
physical id: 0
size: 3793MiB
*-cpu
product: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz
似乎是一个报告的错误(#1554803)
可以
apparmor-easyprof-ubuntu
手动安装或创建文件夹来解决。在我的情况下,当我使用
apt-get remove snapd
. 检查系统日志,似乎 snapd 卸载程序删除了一些目录,但没有删除引用它们的 apparmor 配置文件。我用它修剪了包apt-get purge snapd
并重新启动了apparmor,没有出现错误。对我来说,我无法安装任何软件包,因为两者
ifconfig
都network-manager
无法找到/启动我的 USB wifi 加密狗。所以@xtrchessreal 的评论对我有用:
在恢复模式 shell 中,创建以下目录:
接着
reboot
第 1 步:转到 ubuntu 的高级选项
第 2 步:从 Linux 4.4 开始。0-22 通用(恢复模式)
第 3 步:然后从列表中单击 (dpkg)
第4步:稍等片刻,然后它不起作用输入ubuntu的'sudo-install-(next vesion)16.04 然后等待几分钟
第5步:然后恢复并重新启动