Ubuntu: How to resolve "dpkg: error processing ...python-apport_...-0ubuntu9_all.deb"?
Channel: Roel Van de Paar
Date: 17/06/2019

Ubuntu: How to resolve "dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb"?


Question: Update Manager will not update even though I have over 100 updates to install.
I get a error message like this:
installArchives() failed:
Extracting templates from packages: 29%%
Extracting templates from packages: 58%%
Extracting templates from packages: 88%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 29%%
Extracting templates from packages: 58%%
Extracting templates from packages: 88%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 29%%
Extracting templates from packages: 58%%
Extracting templates from packages: 88%%
Extracting templates from packages: 100%%
Preconfiguring packages ...

Extracting templates from packages: 29%%
Extracting templates from packages: 58%%
Extracting templates from packages: 88%%
Extracting templates from packages: 100%%
Preconfiguring packages ...
(Reading database ...
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 189751 files and directories currently installed.)
Preparing to replace python-problem-report 2.0.1-0ubuntu7 (using .../python-
problem-report_2.0.1-0ubuntu9_all.deb) ...
... (Please watch the video for the full question)

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 1 person ==
I encountered a similar problem on a system which had both python 2.7 and
python 3.4 installed. The problem was a compatibility issue with the package
python-subversion, which apparently only works with python 2 due to a change in
https://stackoverflow.com/questions/14087598/python-3-3-importerror-no-module-
named-configparser. I addressed it by doing
ls -la /usr/bin | grep python
To confirm that the python executable on my path was a symlink to python 3.
Then
ln -s /usr/bin/python2.7 /usr/bin/python
To use python 2 instead. After that apt-get was able to complete normally, and
I reverted my symlink change.
rm -f /usr/bin/python
ln -s /usr/bin/python3.4 /usr/bin/python

== This solution helped 2 people ==
As an alternative, you might try removing the package and adding it afterwards.
This worked for me on the Citrix client. Be careful about what you're removing
(of course).
sudo apt-get remove icaclient:i386

== This solution helped 38 people ==
You can try the following command:
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
If you still end up with the same error, try:
sudo dpkg --configure -a
sudo apt-get -f install
Even if that doesn't work and you still get the same error, check back and we
can sort this out.

== This solution helped 53 people ==
You need to force overwriting of the files causing the errors:
sudo dpkg -i --force-overwrite ＜filename＞
In your case it's going to be:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/python-problem-
report_2.0.1-0ubuntu9_all.deb
Then run:
sudo apt-get -f install
Source: http://www.absolutelytech.com/2010/06/30/solved-error-dpkg-error-
processing-filename-unpack-trying-to-overwrite/

With thanks & praise to God! With thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user T.D. Smith (https://askubuntu.com/users/440851), user Sparhawk (https://askubuntu.com/users/53508), user raz7588 (https://askubuntu.com/users/69406), user karel (https://askubuntu.com/users/94914), user jokerdino (https://askubuntu.com/users/25798), user John S Gruber (https://askubuntu.com/users/63886), user Francisco Oliveira (https://askubuntu.com/users/566224), user Eliah Kagan (https://askubuntu.com/users/22949), user David Lartey (https://askubuntu.com/users/116015), user Bart Blommaerts (https://askubuntu.com/users/77836), and the Stack Exchange Network (http://stackoverflow.com/questions/148383). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.