Подпроцесс вернул код ошибки (решено)

Так что внезапно любая команда apt-get больше не работает для меня. например, когда я набираю sudo apt-get upgrade, он выводит

    After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up snapd (2.32.3.2~14.04) ...
Failed to enable unit: Unit file snapd.autoimport.service does not exist.
dpkg: error processing package snapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

, та же самая проблема возникает у меня, когда я печатаю в apt-get autoremove sudo apt-get install -f и большинстве других команд apt-get. Что я могу на самом деле сделать, не могу найти ничего, что помогло бы мне в Интернете

Так что после того, как я попробовал sudo apt install --reinstall snapd, это то, что он вывел

    Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of snapd is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up snapd (2.32.3.2~14.04) ...
Failed to enable unit: Unit file snapd.autoimport.service does not exist.
dpkg: error processing package snapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

какие-либо другие решения?

0
задан 20 May 2018 в 12:07

1 ответ

Добавить exit 0 кому: /var/lib/dpkg/info/snapd.prerm после #!/bin/sh. Затем сделайте:

dpkg --purge --force-all snapd
sudo apt-get update

Это походит, Вы использовали более старый репозиторий для установки snapd или Вы обновили свою Ubuntu в не очевидный способ. Так, не забывайте проверять Ваш sources.list для недопустимых репозиториев.

0
ответ дан 29 October 2019 в 08:47

Другие вопросы по тегам:

Похожие вопросы: