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) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/python-problem-report_2.0.1-0ubuntu9_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace python-apport 2.0.1-0ubuntu7 (using .../python-apport_2.0.1-0ubuntu9_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace apport 2.0.1-0ubuntu7 (using .../apport_2.0.1-0ubuntu9_all.deb) ...
apport stop/waiting
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/apport_2.0.1-0ubuntu9_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
apport start/running
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace gnome-orca 3.4.1-0ubuntu0.1 (using .../gnome-orca_3.4.2-0ubuntu0.1_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/gnome-orca_3.4.2-0ubuntu0.1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace python-piston-mini-client 0.7.2-0ubuntu1 (using .../python-piston-mini-client_0.7.2+bzr57-0ubuntu1_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/python-piston-mini-client_0.7.2+bzr57-0ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace oneconf 0.2.8 (using .../oneconf_0.2.8.1_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/oneconf_0.2.8.1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace software-center 5.2.2 (using .../software-center_5.2.2.2_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 33, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error processing /var/cache/apt/archives/software-center_5.2.2.2_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 39, in <module>
    from debpython.namespace import add_namespace_files
ValueError: bad marshal data (unknown type code)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace libglade2-0 1:2.6.4-1ubuntu1 (using .../libglade2-0_1%%3a2.6.4-1ubuntu1.1_amd64.deb) ...
Unpacking replacement libglade2-0 ...
Preparing to replace libv4l-0 0.8.6-1ubuntu1 (using .../libv4l-0_0.8.6-1ubuntu2_amd64.deb) ...
De-configuring libv4l-0:i386 ...
Unpacking replacement libv4l-0 ...
Preparing to replace libv4l-0:i386 0.8.6-1ubuntu1 (using .../libv4l-0_0.8.6-1ubuntu2_i386.deb) ...
Unpacking replacement libv4l-0:i386 ...
Preparing to replace libv4lconvert0:i386 0.8.6-1ubuntu1 (using .../libv4lconvert0_0.8.6-1ubuntu2_i386.deb) ...
De-configuring libv4lconvert0 ...
Unpacking replacement libv4lconvert0:i386 ...
Preparing to replace libv4lconvert0 0.8.6-1ubuntu1 (using .../libv4lconvert0_0.8.6-1ubuntu2_amd64.deb) ...
Unpacking replacement libv4lconvert0 ...
Errors were encountered while processing:
 /var/cache/apt/archives/python-problem-report_2.0.1-0ubuntu9_all.deb
 /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb
 /var/cache/apt/archives/apport_2.0.1-0ubuntu9_all.deb
 /var/cache/apt/archives/gnome-orca_3.4.2-0ubuntu0.1_all.deb
 /var/cache/apt/archives/python-piston-mini-client_0.7.2+bzr57-0ubuntu1_all.deb
 /var/cache/apt/archives/oneconf_0.2.8.1_all.deb
 /var/cache/apt/archives/software-center_5.2.2.2_all.deb
Error in function: 
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Setting up libglade2-0 (1:2.6.4-1ubuntu1.1) ...
dpkg: error processing gnome-orca (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
dpkg: error processing python-problem-report (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
Setting up libv4lconvert0 (0.8.6-1ubuntu2) ...
Setting up libv4lconvert0:i386 (0.8.6-1ubuntu2) ...
dpkg: error processing python-piston-mini-client (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
Setting up libv4l-0 (0.8.6-1ubuntu2) ...
Setting up libv4l-0:i386 (0.8.6-1ubuntu2) ...
dpkg: dependency problems prevent configuration of python-apport:
 python-apport depends on python-problem-report (>= 0.94); however:
  Package python-problem-report is not configured yet.
dpkg: error processing python-apport (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-center:
 software-center depends on python-piston-mini-client (>= 0.1+bzr29); however:
  Package python-piston-mini-client is not configured yet.
dpkg: error processing software-center (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of oneconf:
 oneconf depends on python-piston-mini-client (>= 0.3+bzr32-0ubuntu1); however:
  Package python-piston-mini-client is not configured yet.
dpkg: error processing oneconf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apport:
 apport depends on python-apport (>= 2.0.1-0ubuntu7); however:
  Package python-apport is not configured yet.
dpkg: error processing apport (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

This has been going on for two weeks now and I cannot get any updates. Any help would be great.

  • 1
    Please add 4 spaces before each line of 'output'. Please confirm which Ubuntu version. – david6 Jun 9 '12 at 4:06
  • 1
    @david6 Looks like he is using 12.04. Unless he is using Precise packages in Oneiric or other release version. (cue: gnome-orca version is 3.4 among others) – jokerdino Jun 9 '12 at 4:33
  • I tried editing the title to be more specific and took the freedom to add in a 12.04 tag. If any of you disagree, feel free to edit accordingly. – jokerdino Jun 9 '12 at 4:40
  • 1
    The python-problem-report version is part of a precise apport SRU release June 4. – John S Gruber Jun 10 '12 at 16:51

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/

  • 1
    I was having similar issues with getting an overriding problem error and running sudo dpkg -i --force-overwrite <filename> fixed it. Thanks! – Mike Grace Jan 20 '14 at 6:36
  • 1
    +1 i was facing this issue of wine in my ubuntu16.04 OS from a long time. its resolved now. thanks for your valuable answer. – Satish Sharma Mar 4 '17 at 6:13
  • 1
    +1 This stops lxqt daily ppa complaining about my abuses. – Dominic Cerisano Sep 22 '17 at 0:39

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.

  • I had a similar problem with E:Problem renaming the file /var/cache/apt/pkgcache.bin.random chars. Tried the first approach and that worked famouisly. – Elder Geek Dec 9 '15 at 14:30
  • 1
    This had no effect for me. I still get a ton of errors like "dpkg: dependency problems prevent configuration of *" – Cerin Jun 25 '16 at 17:39
  • 1
    What does sudo dpkg --configure -a this mean? – Parag Jadhav Jan 10 '17 at 6:34

It might be a bug in the python-problem-report package or python-minimal package or a bad copy of the package.

I see that this is package from precise-proposed. You may wish to delete this repository from your software sources list and execute apt-get update from a terminal session (Ctrl-Alt-T) to recover.

You can also try deleting python-problem-report_2.0.1-0ubuntu9_all.deb from /var/cache/apt/archives so apt-get upgrade will have to download a fresh copy again. In the terminal (Ctrl-Alt-T) type:

sudo rm /var/cache/apt/archives/python-problem-report_2.0.1-0ubuntu9_all.deb

Alternatively you can use:

sudo apt-get clean

to erase all of the downloaded files in your cache.

Try the upgrade again.

If neither of these help you should leave a comment at https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944 describing your experience in using this proposed package, or once the package is generally release, file a bug against the apport package.

I've left one comment about this question at https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944 but you should add a comment describing the steps you have gone through and the output from apt-get upgrade from above.

  • 2
    While you are right on the money that it probably is a bug in python-problem-report, I am not comfortable recommending the sudo rm command. That should definitely be the last resort. Good job otherwise! – jokerdino Jun 9 '12 at 4:30
  • So long as the sudo rm ... command is not mistyped it should be fine and needn't be considered a last resort: files in /var/cache/apt/archives are just archived (i.e., left over) package files. As John S Gruber says, the somewhat commonly recommended sudo apt-get clean command deletes all those files. Deleting a cached .deb file is a safe and effective way of ensuring a new (and hopefully uncorrupted) .deb must be downloaded next time the package is installed (or reinstalled). – Eliah Kagan Apr 18 '15 at 7:01
  • Didn't work for me – Hack-R Sep 21 '16 at 4:41
sudo update-alternatives --config python

There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.5   2         auto mode
* 1            /usr/bin/python2.7   1         manual mode
  2            /usr/bin/python3.5   2         manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Select option python2.7.

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

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 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
  • The last 2 commands can be replaced by ln -rs /usr/bin/python3.4 /usr/bin/python. Also, if you already have another symlink /usr/bin/python3 pointing to the latest python3 release, as it usually happens, you can make another step forward with ln -rs /usr/bin/python3 /usr/bin/python. Anyway, thanks for the solution, it worked for me after a problem in the mercurial installation. – tigerjack89 May 17 '16 at 18:44

Try this:

mount -t proc proc /proc

It worked for me.

  • Can you add an explanation on why this is a solution? – Igor V. Jul 3 at 16:06

protected by Community Jul 28 '16 at 12:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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