dpkg:error processing package apparmor (--configure)/(--remove)

Ubuntu16.04 install kinetic.

all finished .when run the last command:

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

I met an error:


Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
python-rosinstall is already the newest version (0.7.8-1).
python-rosinstall-generator is already the newest version (0.1.22-1).
python-wstool is already the newest version (0.1.17-1).
0 upgraded, 0 newly installed, 0 to remove and 241 not upgraded.
1 not fully installed or removed.
Need to get 0 B/451 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)


search on StackExchange askubuntu. Finally deal it as follows:

sudo dpkg --remove --force-remove-reinstreq --force-depends apparmor
sudo apt-get -f install

I choose Y, then everything  is ok!!!! you can run comman sucessfully!

all the dpkg: error *******(--configure) or (--remove) can be found here:

https://askubuntu.com/questions/148715/how-to-fix-package-is-in-a-very-bad-inconsistent-state-error

good luck to you:)

(I didnot install sougou, so all is in English)


版权声明:本文为qq_37788870原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。