Dpkg ошибка при обработке архива var cache apt archives

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.

Asked
2 years, 10 months ago

Viewed
4k times

asked Aug 19, 2020 at 15:32

poseidon's user avatar

poseidonposeidon

111 silver badge2 bronze badges

3

Run the following commands.

sudo dpkg -i --force-overwrite kali-themes tilix-common libgtkd-3-0 libphobos2-ldc-shared91 libvted-3-0
sudo apt -f install  
sudo apt install tilix  

answered Aug 19, 2020 at 23:59

karel's user avatar

karelkarel

1,9232 gold badges17 silver badges26 bronze badges

0

Not the answer you’re looking for? Browse other questions tagged

.

При апгрейде sudo apt upgrade или при установке/удалении пакетов через apt или dpkg выводиться следующая ошибка :

Следующие пакеты будут обновлены:
  apport
Обновлено 1 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Установлено или удалено не до конца 6 пакетов.
Необходимо скачать 0 B/124 kB архивов.
После данной операции объём занятого дискового пространства возрастёт на 0 B.
dpkg: предупреждение: список файлов пакета «python-dnspython» отсутствует; предполагаем, что на данный момент у пакета нет установленных файлов
(Чтение базы данных … на данный момент установлено 277296 файлов и каталогов.)
Подготовка к распаковке …/apport_2.20.9-0ubuntu7.7_all.deb …
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: предупреждение: old apport package pre-removal script subprocess returned error exit status 1
dpkg: попытка использовать сценарий из нового пакета …
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: ошибка при обработке архива /var/cache/apt/archives/apport_2.20.9-0ubuntu7.7_all.deb (--unpack):
 new apport package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, 
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error while cleaning up:
 installed apport package post-installation script subprocess returned error exit status 1
При обработке следующих пакетов произошли ошибки:
 /var/cache/apt/archives/apport_2.20.9-0ubuntu7.7_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я пробовал :
<b>sudo apt install -f</b>

<b>sudo dpkg --configure -a</b> выводит :

Настраивается пакет python-pkg-resources (39.0.1-2) …
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, 
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: ошибка при обработке пакета python-pkg-resources (--configure):
 installed python-pkg-resources package post-installation script subprocess returned error exit status 1
Настраивается пакет python-configparser (3.5.0-1) …
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, 
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: ошибка при обработке пакета python-configparser (--configure):
 installed python-configparser package post-installation script subprocess returned error exit status 1
dpkg: зависимости пакетов не позволяют настроить пакет gyp:
 gyp зависит от python-pkg-resources, однако:
  Пакет python-pkg-resources пока не настроен.

dpkg: ошибка при обработке пакета gyp (--configure):
 проблемы зависимостей — оставляем не настроенным
dpkg: ошибка при обработке пакета apport (--configure):
 пакет абсолютно неработоспособен; перед настройкой его
 следует переустановить
dpkg: зависимости пакетов не позволяют настроить пакет node-gyp:
 node-gyp зависит от gyp (>= 0.1+20150913git1f374df9), однако:
  Пакет gyp пока не настроен.

dpkg: ошибка при обработке пакета node-gyp (--configure):
 проблемы зависимостей — оставляем не настроенным
dpkg: зависимости пакетов не позволяют настроить пакет npm:
 npm зависит от node-gyp (>= 0.10.9), однако:
  Пакет node-gyp пока не настроен.

dpkg: ошибка при обработке пакета npm (--configure):
 проблемы зависимостей — оставляем не настроенным
При обработке следующих пакетов произошли ошибки:
 python-pkg-resources
 python-configparser
 gyp
 apport
 node-gyp
 npm

Также я попытался :
<b>sudo dpkg --purge /var/cache/apt/archives/apport_2.20.9-0ubuntu7.7_all.deb</b>
<b>sudo dpkg -i --force-overwrite /var/cache/apt/archives/apport_2.20.9-0ubuntu7.7_all.deb</b>

Эти ошибки возникли после попытки установки npm. Пакетный менеджер в итоге установился но сделал много пакостей. Забавно то что обновление sudo apt update выполняеться успешно, но все остальные действия с apt и dpkg безуспешны. Надеюсь у вас есть какие-то соображения по этому вопросу т.к. google уже не помогает.
Заранее всем спасибо!

I got this error when trying to install anything on ubuntu 16.04.

SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/python-
samba_2%3a4.3.11+dfsg-0ubuntu0.16.04.6_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, 
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/python-libxml2_2.9.3+dfsg1-1ubuntu0.2_amd64.deb
/var/cache/apt/archives/python-samba_2%3a4.3.11+dfsg-0ubuntu0.16.04.6_amd64.deb
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried apt-get -f install but it shows the same error . could anyone help ?

asked Apr 29, 2017 at 14:42

Ahmed Samir's user avatar

5

After a while in searching , i have fixed the problem with those lines in terminal:

 $ sudo apt-get clean
 $ sudo apt-get update
 $ sudo apt-get install --reinstall python-minimal python-lockfile
 $ sudo apt-get -f install

answered Apr 30, 2018 at 14:10

Ahmed Samir's user avatar

Ahmed SamirAhmed Samir

1441 gold badge2 silver badges8 bronze badges

1

For a generic approach on how to deal with the issue stated in this question’s header, also check answers of this question

the following fixed my issue

sudo dpkg -P <program>

answered Oct 26, 2022 at 10:18

til's user avatar

tiltil

72210 silver badges26 bronze badges

To fix this problem, please check your Python versions.

Insert command:

update-alternatives --config python

enter image description here

Then enable version 2.7.

Now check.

Jeremy Caney's user avatar

Jeremy Caney

7,03263 gold badges48 silver badges76 bronze badges

answered Jun 7, 2020 at 6:27

Ashkan Ebrahimi's user avatar


0

1

dpkg-deb (подпроцесс): разжимающий элемент архива: ошибка lzma: сжатые данные повреждены
dpkg-deb: ошибка: <decompress> subprocess returned error exit status 2
dpkg: ошибка при обработке архива /var/cache/apt/archives/virtualbox_6.1.16-dfsg-6~ubuntu1.20.04.1_amd64.deb (--unpack):
 dpkg-deb --fsys-tarfile subprocess returned error exit status 2
При обработке следующих пакетов произошли ошибки:
 /var/cache/apt/archives/virtualbox_6.1.16-dfsg-6~ubuntu1.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Как фиксить?

Возможно, вам также будет интересно:

  • Double check chip or use f to override this check ошибка при записи загрузчика
  • Double cannot be dereferenced java ошибка
  • Dotnet new console ошибка сегментирования стек памяти сброшен на диск
  • Dota 2 профессиональные данные ошибка
  • Dota 2 ошибка повторите попытку

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии