¿Cómo resolver "dpkg: error al procesar /var/cache/apt/archives/python-apport_2.0.1-0ubuntu9_all.deb"?


47

Update Manager no se actualizará a pesar de que tengo más de 100 actualizaciones para instalar. Recibo un mensaje de error como este:

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

Esto ha estado sucediendo durante dos semanas y no puedo obtener ninguna actualización. Cualquier ayuda sería genial.


1
Agregue 4 espacios antes de cada línea de 'salida'. Por favor confirme qué versión de Ubuntu .
— david6

1
@ david6 Parece que está usando 12.04. A menos que esté usando paquetes Precise en Oneiric u otra versión de lanzamiento. (señal: la versión gnome-orca es 3.4 entre otras)
— jokerdino

Intenté editar el título para ser más específico y tomé la libertad de agregar una etiqueta 12.04. Si alguno de ustedes no está de acuerdo, siéntase libre de editar en consecuencia.
— jokerdino

1
La versión de informe de problemas de python es parte de un lanzamiento preciso de SRU del 4 de junio.
— John S Gruber

Respuestas:


61

Debe forzar la sobrescritura de los archivos que causan los errores:

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

En tu caso será:

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

Entonces corre:

sudo apt-get -f install

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


1
Estaba teniendo problemas similares al obtener un error de problema primordial y ejecutar sudo dpkg -i --force-overwrite <nombre de archivo> lo solucionó. ¡Gracias!
— Mike Grace

1
Hace mucho tiempo que enfrentaba este problema del vino en mi sistema operativo ubuntu16.04. está resuelto ahora. Gracias por tu valiosa respuesta.
— Satish Sharma

1
+1 Esto detiene lxqt ppa diario quejándose de mis abusos
— Dominic Cerisano

38

Puedes probar el siguiente comando:

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

Si aún termina con el mismo error, intente:

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

Incluso si eso no funciona y sigue teniendo el mismo error, vuelva a consultar y podemos solucionarlo.


Tuve un problema similar con E: problema al cambiar el nombre del archivo /var/cache/apt/pkgcache.bin.random chars. Intenté el primer acercamiento y eso funcionó familiarmente.
— Élder Geek

1
Esto no tuvo ningún efecto para mí. Todavía recibo un montón de errores como "dpkg: los problemas de dependencia impiden la configuración de *"
— Cerin

1
¿Qué significa sudo dpkg --configure -aesto?
— Parag Jadhav

5

Puede ser un error en el paquete python-problem-report o en el paquete python-minimal o una copia incorrecta del paquete.

Veo que este es un paquete de propuesta precisa. Es posible que desee eliminar este repositorio de su lista de fuentes de software y ejecutarlo apt-get updatedesde una sesión de terminal ( Ctrl- Alt- T) para recuperarlo.

También puede intentar eliminarlo, python-problem-report_2.0.1-0ubuntu9_all.debpor /var/cache/apt/archiveslo que apt-get upgradedeberá descargar una copia nueva nuevamente. En la terminal ( Ctrl- Alt- T) escriba:

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

Alternativamente, puede usar:

sudo apt-get clean

para borrar todos los archivos descargados en su caché.

Intente la actualización nuevamente.

Si ninguno de estos ayuda, debe dejar un comentario en https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944 describiendo su experiencia en el uso de este paquete propuesto, o una vez que el paquete sea generalmente lanzado, presente un error contra el paquete de apport.

He dejado un comentario sobre esta pregunta en https://bugs.launchpad.net/ubuntu/+source/apport/+bug/984944, pero debe agregar un comentario que describa los pasos que ha seguido y la salida de apt- obtener actualización desde arriba.


2
Si bien tiene razón en el dinero que probablemente sea un error python-problem-report, no me siento cómodo recomendando el sudo rmcomando. Eso definitivamente debería ser el último recurso. Buen trabajo de lo contrario!
— jokerdino

Mientras el sudo rm ...comando no esté mal escrito, debería estar bien y no es necesario considerarlo como último recurso: los archivos /var/cache/apt/archivessolo se archivan (es decir, sobran) archivos de paquete. Como dice John S Gruber, el sudo apt-get cleancomando algo comúnmente recomendado elimina todos esos archivos. Eliminar un archivo .deb almacenado en caché es una forma segura y efectiva de garantizar que se descargue un nuevo .deb nuevo (y esperamos que no esté dañado) la próxima vez que se instale (o reinstale) el paquete.
— Eliah Kagan

No funcionó para mí
— Hack-R

5
sudo update-alternatives --config python

Hay 2 opciones para la python alternativa (que proporciona / 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: 

Seleccione la opción python2.7.


2

Como alternativa, puede intentar eliminar el paquete y agregarlo después. Esto funcionó para mí en el cliente Citrix. Tenga cuidado con lo que está eliminando (por supuesto).

sudo apt-get remove icaclient:i386

1

Encontré un problema similar en un sistema que tenía python 2.7 y python 3.4 instalados. El problema era un problema de compatibilidad con el paquete python-subversion , que aparentemente solo funciona con python 2 debido a un cambio en ConfigParser . Lo abordé haciendo

ls -la /usr/bin | grep python

Para confirmar que el ejecutable de Python en mi ruta era un enlace simbólico a Python 3. Luego

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

Para usar python 2 en su lugar. Después de eso, apt-get pudo completarse normalmente, y revertí mi cambio de enlace simbólico.

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

Los últimos 2 comandos pueden ser reemplazados por ln -rs /usr/bin/python3.4 /usr/bin/python. Además, si ya tiene otro enlace simbólico que /usr/bin/python3apunta a la última python3versión, como suele suceder, puede dar otro paso adelante ln -rs /usr/bin/python3 /usr/bin/python. De todos modos, gracias por la solución, funcionó para mí después de un problema en la mercurialinstalación.
— tigerjack89

-1

Prueba esto:

mount -t proc proc /proc

Funcionó para mi.


¿Puedes agregar una explicación de por qué esta es una solución?
— Igor V.
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.