Wie kann man „dpkg: error processing /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb“ beheben?


47

Der Update Manager wird nicht aktualisiert, obwohl über 100 Updates installiert werden müssen. Ich erhalte folgende Fehlermeldung:

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

Dies ist seit zwei Wochen so und ich kann keine Updates bekommen. Jede Hilfe wäre toll.


1
Fügen Sie vor jeder Ausgabezeile 4 Leerzeichen ein. Bitte bestätige welche Ubuntu Version.
— David6

1
@ David6 Sieht aus wie er 12.04 verwendet. Es sei denn, er verwendet Precise-Pakete in Oneiric oder einer anderen Release-Version. (Stichwort: Gnome-Orca-Version ist unter anderem 3.4)
— jokerdino

Ich habe versucht, den Titel genauer zu bearbeiten, und mir die Freiheit genommen, einen 12.04-Tag hinzuzufügen. Wenn einer von Ihnen nicht einverstanden ist, können Sie ihn entsprechend bearbeiten.
— jokerdino

1
Die Python-Problem-Report-Version ist Teil einer präzisen Apport-SRU-Veröffentlichung vom 4. Juni.
— John S Gruber

Antworten:


61

Sie müssen das Überschreiben der Dateien erzwingen, die die Fehler verursachen:

sudo dpkg -i --force-overwrite <filename>

In Ihrem Fall wird es sein:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/python-problem-report_2.0.1-0ubuntu9_all.deb

Dann renne:

sudo apt-get -f install

Quelle: http://www.absolutelytech.com/2010/06/30/solved-error-dpkg-error-processing-filename-unpack-trying-to-overwrite/


1
Ich hatte ähnliche Probleme mit einem überschreibenden Problemfehler und dem Ausführen von sudo dpkg -i --force-overwrite <Dateiname>, um dieses Problem zu beheben. Vielen Dank!
— Mike Grace

1
+1 Ich habe diese Ausgabe von Wein in meinem Ubuntu16.04-Betriebssystem seit langer Zeit konfrontiert. es ist jetzt gelöst. danke für deine wertvolle antwort.
— Satish Sharma

1
+1 Dies verhindert, dass sich lxqt daily ppa über meine Missbräuche beschwert.
— Dominic Cerisano

38

Sie können den folgenden Befehl versuchen:

sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

Wenn immer noch derselbe Fehler auftritt, versuchen Sie Folgendes:

sudo dpkg --configure -a
sudo apt-get -f install

Auch wenn das nicht funktioniert und Sie immer noch den gleichen Fehler erhalten, versuchen Sie es noch einmal und wir können das klären.


Ich hatte ein ähnliches Problem mit E: Problem beim Umbenennen der Datei /var/cache/apt/pkgcache.bin.random chars. Versuchte den ersten Ansatz und das funktionierte bekanntermaßen.
— Elder Geek

1
Das hatte für mich keine Auswirkung. Ich bekomme immer noch eine Menge Fehler wie "dpkg: Abhängigkeitsprobleme verhindern die Konfiguration von *"
— Cerin

1
Was bedeutet sudo dpkg --configure -adas
— Parag Jadhav

5

Möglicherweise handelt es sich um einen Fehler im Paket python-problem-report oder python-minimal oder um eine fehlerhafte Kopie des Pakets.

Ich sehe, dass dies Paket von genau vorgeschlagen ist. Möglicherweise möchten Sie dieses Repository aus Ihrer Software-Quellenliste löschen und apt-get updateüber eine Terminalsitzung ( Ctrl- Alt- T) ausführen , um es wiederherzustellen.

Sie können auch versuchen , das Löschen python-problem-report_2.0.1-0ubuntu9_all.debvon /var/cache/apt/archivesso apt-get upgradewieder eine neue Kopie herunterladen müssen. Im Terminal ( Ctrl- Alt- T) geben Sie ein:

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

Alternativ können Sie verwenden:

sudo apt-get clean

um alle heruntergeladenen Dateien in Ihrem Cache zu löschen.

Versuchen Sie das Upgrade erneut.

Wenn keine dieser Lösungen hilfreich ist, sollten Sie unter https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944 einen Kommentar hinterlassen, in dem Ihre Erfahrungen mit der Verwendung dieses vorgeschlagenen Pakets beschrieben werden ein Bug gegen das Apport-Paket.

Ich habe unter https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944 einen Kommentar zu dieser Frage hinterlassen, aber Sie sollten einen Kommentar hinzufügen, in dem die von Ihnen durchgeführten Schritte und die Ausgabe von apt- Upgrade von oben erhalten.


2
Sie haben Recht mit dem Geld, das wahrscheinlich ein Fehler ist python-problem-report, aber ich kann den sudo rmBefehl nicht empfehlen . Das sollte definitiv der letzte Ausweg sein. Ansonsten gute Arbeit!
— jokerdino

Solange der sudo rm ...Befehl nicht falsch geschrieben ist, sollte er in Ordnung sein und nicht als letzter Ausweg angesehen werden: Dateien in /var/cache/apt/archiveswerden nur archiviert (dh übrig gelassen). Wie John S Gruber sagt, sudo apt-get cleanlöscht der häufig empfohlene Befehl alle diese Dateien. Das Löschen einer zwischengespeicherten .deb-Datei ist eine sichere und effektive Methode, um sicherzustellen, dass beim nächsten Installieren (oder erneuten Installieren) des Pakets eine neue (und hoffentlich unbeschädigte) .deb heruntergeladen werden muss.
— Eliah Kagan

Hat bei mir nicht funktioniert
— Hack-R

5
sudo update-alternatives --config python

Für das alternative Python gibt es zwei Möglichkeiten (Bereitstellung von / 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: 

Wählen Sie die Option python2.7.


2

Alternativ können Sie versuchen, das Paket zu entfernen und anschließend hinzuzufügen. Dies funktionierte für mich auf dem Citrix-Client. Seien Sie vorsichtig mit dem, was Sie entfernen (natürlich).

sudo apt-get remove icaclient:i386

1

Ich habe ein ähnliches Problem auf einem System festgestellt, auf dem sowohl Python 2.7 als auch Python 3.4 installiert waren. Das Problem war ein Kompatibilitätsproblem mit dem Paket python-subversion , das aufgrund einer Änderung in ConfigParser anscheinend nur mit Python 2 funktioniert . Ich habe es angesprochen, indem ich getan habe

ls -la /usr/bin | grep python

Um zu bestätigen, dass die ausführbare Python- Datei auf meinem Pfad ein Symlink zu Python 3 war. Dann

ln -s /usr/bin/python2.7 /usr/bin/python

Verwenden Sie stattdessen Python 2. Danach konnte apt-get normal abgeschlossen werden und ich machte meine Symlink-Änderung rückgängig.

rm -f /usr/bin/python
ln -s /usr/bin/python3.4 /usr/bin/python

Die letzten 2 Befehle können durch ersetzt werden ln -rs /usr/bin/python3.4 /usr/bin/python. Wenn Sie bereits einen anderen Symlink haben /usr/bin/python3, der auf die neueste python3Version verweist , können Sie wie gewöhnlich einen weiteren Schritt nach vorne machen ln -rs /usr/bin/python3 /usr/bin/python. Trotzdem, danke für die Lösung, es hat bei mir nach einem Problem in der mercurialInstallation geklappt.
— Tigerjack89

-1

Versuche dies:

mount -t proc proc /proc

Es hat bei mir funktioniert.


Können Sie eine Erklärung hinzufügen, warum dies eine Lösung ist?
— Igor V.
Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.