Eu tive o mesmo erro, então eu corrigi-o usando isso
sudo dpkg --purge path/package.deb
sudo apt-get -f install
sudo apt-get update && sudo apt-get upgrade
enquanto eu tento
sudo apt-get upgrade
Eu obtenho o seguinte:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
apport
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
28 not fully installed or removed.
Need to get 0 B/120 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 534975 files and directories currently installed.)
Preparing to unpack .../apport_2.20.1-0ubuntu2.6_all.deb ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 19: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
O que há de errado com apport
e
dpkg: error while cleaning up:
e
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
eu tentei:
sudo dpkg --purge --force-all apport
então eu peguei:
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
(Reading database ... 534968 files and directories currently installed.)
Removing apport (2.20.1-0ubuntu2.5) ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: error processing package apport (--purge):
subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
apport
depois disso:
Eu verifiquei e posso confirmar que /var/lib/dpkg/info/apport.postinst
e /var/lib/dpkg/info/apport.prerm
existem no sistema.
todos os comandos a seguir não funcionaram para mim:
sudo apt-get install apport --reinstall
sudo dpkg --purge --force-all apport
sudo apt-get clean
sudo apt purge apport
sudo apt install apport
sudo apt -f install
udo dpkg -i --force-overwrite apport
dpkg -i --force-overwrite /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
sudo apt-get -o Dpkg::Options::="--force-overwrite" install apport-dev
edit1 Eu também tentei
sudo dpkg -r man-db mas eu fico preso aqui:
dpkg: error processing package man-db (--remove):
dependency problems - not removing
Errors were encountered while processing:
man-db
o acompanhamento não pode ser executado
sudo dpkg -r apport
sudo apt-get upgrade
sudo apt-get install -f
Eu tive o mesmo erro, então eu corrigi-o usando isso
sudo dpkg --purge path/package.deb
sudo apt-get -f install
sudo apt-get update && sudo apt-get upgrade