while l try
sudo apt-get upgrade
l get the following :
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)
What's wrong with apport
and
dpkg: error while cleaning up:
and
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)
l tried :
sudo dpkg --purge --force-all apport
then l got :
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
after that :
I checked and can confirm that both /var/lib/dpkg/info/apport.postinst
and /var/lib/dpkg/info/apport.prerm
exist on the system.
all the following commands didn't work for me :
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 l tried also
sudo dpkg -r man-db but l get stuck here :
dpkg: error processing package man-db (--remove):
dependency problems - not removing
Errors were encountered while processing:
man-db
then the folwing can't be run
sudo dpkg -r apport
sudo apt-get upgrade
sudo apt-get install -f