dpkg: error processing package libraspberrypi-doc (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
libraspberrypi-doc
E: Sub-process /usr/bin/dpkg returned an error code (1)
solved key:
sudo dpkg --remove --force-remove-reinstreq yourpackages