I have encountered various package management problems that cause APT commands to fail with output that ends with this line:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Occasionally other error codes may appear such as
100 which means dpkg is not there, but
1 is the most common error code.
Unfortunately this error code tells me almost nothing about what actually caused the error or how I should solve it. Almost every package management issue I see, regardless of its cause or solution, produces the same error!
So, where will I find the useful part of the output, which I can search for online or ask questions about on Ask Ubuntu?