在Ubuntu 17.10中Apparmor初始化失败


9

安装ubuntu 17.10后,我开始在启动时出现此错误。这是输出

$ sudo service apparmor status
    pparmor.service - AppArmor initialization
   Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2017-11-07 08:48:16 EET; 10min ago
     Docs: man:apparmor(7)
           http://wiki.apparmor.net/
 Main PID: 621 (code=exited, status=123)

Nov 07 08:48:16 logician-724 apparmor[621]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Nov 07 08:48:16 logician-724 apparmor[621]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Nov 07 08:48:16 logician-724 apparmor[621]: 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/
Nov 07 08:48:16 logician-724 apparmor[621]: AppArmor parser error for /etc/apparmor.d/usr.lib.mediascanner-2.0.mediascanner-extractor in /etc/apparmor.d/usr.lib.mediascanner-2.0.mediascanner
Nov 07 08:48:16 logician-724 apparmor[621]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Nov 07 08:48:16 logician-724 apparmor[621]:    ...fail!
Nov 07 08:48:16 logician-724 systemd[1]: apparmor.service: Main process exited, code=exited, status=123/n/a
Nov 07 08:48:16 logician-724 systemd[1]: Failed to start AppArmor initialization.
Nov 07 08:48:16 logician-724 systemd[1]: apparmor.service: Unit entered failed state.
Nov 07 08:48:16 logician-724 systemd[1]: apparmor.service: Failed with result 'exit-code'.

Answers:


8

我在三个Ubuntu 17.10系统上都得到了完全相同的错误。似乎发生的是,由于两个软件包“ webbrowser-app”和“ mediascanner2.0”中策略文件中的错误,apparmor启动脚本返回了错误。这两个软件包中的策略文件尝试包含不存在的目录中的文件。这是这两个包装的包装中的错误。从“ sudo aa-status”的输出可以看出,该错误仅影响这两个软件包提供的策略。

解决方法是安装提供缺少目录的软件包“ apparmor-easyprof-ubuntu”。安装此软件包后,错误在我的系统上消失了。

参考:https : //bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1554803


2

重新安装mediascanner2.0和删除webbrowser-app对我有用。

 sudo apt install --reinstall mediascanner2.0
 sudo apt purge webbrowser-app
 sudo apt autoremove --purge

0

我遇到了这个问题,并且找到了以下解决方案:

apt install -y apparmor-easyprof-ubuntu
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.