我在互联网上搜索了很久,这个问题与我见过的“apparmor 失败状态 = 123”问题明显不同。
基本上,每当我尝试使用 apt(apt install、apt --fix-broken install、apt remove)运行任何东西时,我都会得到以下内容(它获取数据库,读取数据库,然后):
Removing cqrlog (2.0.5-3ubuntu1) ...
Changes removed from /etc/apparmor.d/local/usr.sbin.mysqld
Restarting apparmor...
Job for apparmor.service failed because the control process exited with error code.
See "systemctl status apparmor.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apparmor, action "restart" failed.
* apparmor.service - AppArmor initialization
Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-02-19 11:37:06 CST; 14ms ago
Docs: man:apparmor(7)
http://wiki.apparmor.net/
Process: 4571 ExecStart=/etc/init.d/apparmor start (code=exited, status=1/FAILURE)
Main PID: 4571 (code=exited, status=1/FAILURE)
Feb 19 11:37:06 lenovo-laptop systemd[1]: Starting AppArmor initialization...
Feb 19 11:37:06 lenovo-laptop apparmor[4571]: * Starting AppArmor profiles
Feb 19 11:37:06 lenovo-laptop apparmor[4571]: * Mounting securityfs on ...
Feb 19 11:37:06 lenovo-laptop apparmor[4571]: mount: : mount point does not exist.
Feb 19 11:37:06 lenovo-laptop apparmor[4571]: ...fail!
Feb 19 11:37:06 lenovo-laptop systemd[1]: apparmor.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 11:37:06 lenovo-laptop systemd[1]: apparmor.service: Failed with result 'exit-code'.
Feb 19 11:37:06 lenovo-laptop systemd[1]: Failed to start AppArmor initialization.
dpkg: error processing package cqrlog (--remove):
installed cqrlog package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
cqrlog
E: Sub-process /usr/bin/dpkg returned an error code (1)
“安装 snap” 的建议当然行不通,因为我什么都不能安装。我对 Ubuntu 并不陌生(从 10 或 11 开始使用,从 1999 年开始使用 FreeBSD...),但我对 apparmor 还不熟悉,因为我从来没有遇到过任何问题。
我该怎么做?谢谢!
答案1
我在同一个 ubuntu 版本中遇到了同样的错误,但我的问题出在服务上spice-vdagentd.service
。
我通过一些非常简单的方法来修复它:从我的电脑中删除该服务:
sudo apt-get remove spice-vdagentd.service
因此,对于你的情况,你可以尝试:
sudo apt-get remove apparmor.service