Apparmor gagal menjalankan boot dan perintah mulai dengan hasil yang sama seperti di bawah ini
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'.
Direktori apparmor/hardware/
dan file graphics.d
tidak ada di dalam /usr/share/
Jadi #include /usr/share/apparmor/hardware/graphics.d
pada baris 26 dari /etc/apparmor.d/usr.bin.webbrowser-app
pengembalian nol dan menyebabkan kegagalan.
Bagaimana saya bisa memperbaiki ini dengan benar atau setidaknya membuat solusi yang memungkinkan apparmor.service
untuk menginternalisasi tanpa kegagalan?
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
ifconfig
dannetwork-manager
tidak mau memuat (saya punya dongle wifi USB). Jadi saran @xtrchessreal adalah apa yang berhasil.Bagi saya, saya tidak dapat menginstal paket apa pun karena keduanya
ifconfig
dannetwork-manager
tidak dapat menemukan / memulai dongle wifi USB saya.Jadi komentar @ xtrchessreal adalah yang bekerja untuk saya :
Dalam shell mode pemulihan, buat direktori berikut:
Lalu
reboot
sumber
Dalam kasus saya, masalah muncul ketika saya menghapus paket snapd dengan
apt-get remove snapd
. Memeriksa syslog, tampaknya snapd uninstaller menghapus beberapa direktori tetapi bukan file konfigurasi apparmor yang merujuknya. Saya memangkas paket denganapt-get purge snapd
dan me-restart apparmor tanpa kesalahan.sumber