0

When I do sudo apt-get upgrade in the terminal, I get at the end the following:

Errors detected during processing: apparmor E: Sub-process /usr/bin/dpkg returned an error code (1)

Can this error be fixed ?

Thanks in advance.

Full terminal output:

sudo apt upgrade
[sudo] password for sam:       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
 gir1.2-json-1.0 libatkmm-1.6-1v5 libcairomm-1.0-1v5 libdbusmenu-gtk4 libglibmm-2.4-1v5 libido3-0.1-0 libllvm4.0 libpangomm-1.4-1v5 libqmi-glib1 libsigc++-2.0-0v5 libvala-0.34-0 linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-image-4.10.0-32-generic linux-image-extra-4.10.0-32-generic sbsigntool
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/450 kB of archives.
After this operation, 0 B of additional disk space will be used.
 Do you want to continue? [Y/n] y
 dpkg: error processing package apparmor (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 apparmor
E: Sub-process /usr/bin/dpkg returned an error code (1)

2 Answers 2

0

That's a standard error when some process is already using dkpg or you didn't complete a update process successfully.

For a start, try to reinstall apparmor: sudo apt install --reinstall -f apparmor. Then edit your question if any new error appears.

0

sudo apt upgrade [sudo] password for sam:
Reading package lists... Done Building dependency tree
Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: gir1.2-json-1.0 libatkmm-1.6-1v5 libcairomm-1.0-1v5 libdbusmenu-gtk4 libglibmm-2.4-1v5 libido3-0.1-0 libllvm4.0 libpangomm-1.4-1v5 libqmi-glib1 libsigc++-2.0-0v5 libvala-0.34-0 linux-headers-4.10.0-32 linux-headers-4.10.0-32-generic linux-image-4.10.0-32-generic linux-image-extra-4.10.0-32-generic sbsigntool Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/450 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y dpkg: error processing package apparmor (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Errors were encountered while processing: apparmor E: Sub-process /usr/bin/dpkg returned an error code (1)

1
  • You should edit your question and add this directly there, no need to create a new answer with the terminal output.
    – Maccer
    Commented Mar 12, 2018 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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