0

On my Ubuntu 16.04.5 LTS system I have installed Firefox ESR 52.9.0 to have some Legacy Addons working on it.

It was installed from JonathonF PPA and then pinned:

$ apt-cache policy firefox-esr
firefox-esr:
  Installed: 52.9.0esr-1~16.04.york0
  Candidate: 52.9.0esr-1~16.04.york0
  Version table:
     60.8.0esr-1~16.04.york 500
        500 http://ppa.launchpad.net/jonathonf/firefox-esr/ubuntu xenial/main amd64 Packages
 *** 52.9.0esr-1~16.04.york0 1337
        100 /var/lib/dpkg/status

$ cat /etc/apt/preferences.d/pin-firefox 
Package: firefox-esr
Pin: version 52.9.0esr-1~16.04.york0
Pin-Priority: 1337

There is no firefox package on my system.

I see that AppArmor service is not started on my system:

$ 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 Вс 2019-09-08 00:07:34 MSK; 1min 47s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8876 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)

сен 08 00:07:34 norbert-UX32A apparmor[8876]:  * Starting AppArmor profiles
сен 08 00:07:34 norbert-UX32A apparmor[8876]: AppArmor parser error for /etc/apparmor.d/usr.bin.firefox-esr in /etc/apparmor.d/usr.bin.f...irefox'
сен 08 00:07:34 norbert-UX32A apparmor[8876]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
сен 08 00:07:34 norbert-UX32A apparmor[8876]: AppArmor parser error for /etc/apparmor.d/usr.bin.firefox-esr in /etc/apparmor.d/usr.bin.f...irefox'
сен 08 00:07:34 norbert-UX32A apparmor[8876]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
сен 08 00:07:34 norbert-UX32A apparmor[8876]:    ...fail!
сен 08 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Control process exited, code=exited status=123
сен 08 00:07:34 norbert-UX32A systemd[1]: Failed to start LSB: AppArmor initialization.
сен 08 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Unit entered failed state.
сен 08 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.

$ tail -f /var/log/syslog | grep apparmor

Sep  8 00:07:34 norbert-UX32A apparmor[8876]: AppArmor parser error for /etc/apparmor.d/usr.bin.firefox-esr in /etc/apparmor.d/usr.bin.firefox-esr at line 224: Could not open 'abstractions/ubuntu-browsers.d/firefox'
Sep  8 00:07:34 norbert-UX32A apparmor[8876]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Sep  8 00:07:34 norbert-UX32A apparmor[8876]:    ...fail!
Sep  8 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Control process exited, code=exited status=123
Sep  8 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Unit entered failed state.
Sep  8 00:07:34 norbert-UX32A systemd[1]: apparmor.service: Failed with result 'exit-code'.

The /etc/apparmor.d/usr.bin.firefox-esr file came from firefox-esr package:

$ dpkg -S /etc/apparmor.d/usr.bin.firefox-esr
firefox-esr: /etc/apparmor.d/usr.bin.firefox-esr

It seems that main problem is "Could not open 'abstractions/ubuntu-browsers.d/firefox'". Where can I get this file? Or how should I fix this error?

1 Answer 1

0

The abstractions/ubuntu-browsers.d/firefox file and /etc/apparmor.d/local/usr.bin.firefox does not correspond to any package, but created by postinstall script named firefox.postinst.

We can recreate these files with the following long command

cat << EOF | sudo tee /etc/apparmor.d/abstractions/ubuntu-browsers.d/firefox
# This file is updated by 'aa-update-browser' and may be overwritten on
# upgrades.
#
# For site-specific adjustments, please see /etc/apparmor.d/local/<binary>

#include <abstractions/ubuntu-browsers.d/plugins-common>
#include <abstractions/ubuntu-browsers.d/mailto>
#include <abstractions/ubuntu-browsers.d/multimedia>
#include <abstractions/ubuntu-browsers.d/productivity>
#include <abstractions/ubuntu-browsers.d/java>
#include <abstractions/ubuntu-browsers.d/kde>
#include <abstractions/ubuntu-browsers.d/text-editors>
#include <abstractions/ubuntu-browsers.d/ubuntu-integration>
#include <abstractions/ubuntu-browsers.d/user-files>
EOF

and small command:

sudo touch /etc/apparmor.d/local/usr.bin.firefox

and AppArmor will start as usual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.