apparmor error while removing python3.7 in lxd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binfmt-support (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In a focal LXD container, I was replacing python3.7 with python3.8. At the end, I ran autoremove to get rid of the last python3.7 pieces, and this happened:
$ sudo apt autoremove
sudo: setrlimit(
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libfreetype6 libpython3.7 libpython3.7-dev libpython3.
0 upgraded, 0 newly installed, 6 to remove and 55 not upgraded.
After this operation, 46.9 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 60389 files and directories currently installed.)
Removing libfreetype6:amd64 (2.10.1-2) ...
Removing libpython3.
Removing libpython3.7:amd64 (3.7.6-1ubuntu2) ...
Removing libpython3.
Removing python3.7-minimal (3.7.6-1ubuntu2) ...
Unlinking and removing bytecode for runtime python3.7
update-binfmts: warning: unable to open /proc/sys/
update-binfmts: warning: unable to disable binary format python3.7
update-binfmts: exiting due to previous errors
dpkg: error processing package python3.7-minimal (--remove):
installed python3.7-minimal package pre-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
python3.7-minimal
Processing was halted because there were too many errors.
sudo apt-get bE: Sub-process /usr/bin/dpkg returned an error code (1)
dmesg shows the apparmor DENIED messages:
[1960915.476179] audit: type=1400 audit(158106307
[1960915.514190] audit: type=1400 audit(158106307
[1964558.405803] audit: type=1400 audit(158106671
[1964558.440736] audit: type=1400 audit(158106671
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: binfmt-support 2.2.0-2
ProcVersionSign
Uname: Linux 5.4.0-9-generic x86_64
ApportVersion: 2.20.11-0ubuntu16
Architecture: amd64
Date: Fri Feb 7 13:02:00 2020
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: binfmt-support
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.