0

I removed python from /usr/bin/

dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python3-problem-report_2.20.1-0ubuntu2.9_all.deb ...
/var/lib/dpkg/info/python3-problem-report.prerm: 6: /var/lib/dpkg/info/python3-problem-report.prerm: py3clean: 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: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-problem-report_2.20.1-0ubuntu2.9_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-problem-report.postinst: 6: /var/lib/dpkg/info/python3-problem-report.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python3-apport_2.20.1-0ubuntu2.9_all.deb ...
/var/lib/dpkg/info/python3-apport.prerm: 6: /var/lib/dpkg/info/python3-apport.prerm: py3clean: 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: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-apport_2.20.1-0ubuntu2.9_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python3-apport.postinst: 6: /var/lib/dpkg/info/python3-apport.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../software-properties-common_0.96.20.7_all.deb ...
/var/lib/dpkg/info/software-properties-common.prerm: 6: /var/lib/dpkg/info/software-properties-common.prerm: py3clean: 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: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/software-properties-common_0.96.20.7_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/software-properties-common.postinst: 6: /var/lib/dpkg/info/software-properties-common.postinst: py3compile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../software-properties-gtk_0.96.20.7_all.deb ...
/var/lib/dpkg/info/software-properties-gtk.prerm: 6: /var/lib/dpkg/info/software-properties-gtk.prerm: py3clean: 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: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/software-properties-gtk_0.96.20.7_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/software-properties-gtk.postinst: 6: /var/lib/dpkg/info/software-properties-gtk.postinst: py3compile: not found
Ravexina
  • 55,668
  • 25
  • 164
  • 183

1 Answers1

0

Run the following command:

apt-get  -f install

to correct a system with broken dependencies in place.

Try also: dpkg --configure -a.


Note that py3compile file is part of python3-minimal package, so if you still got the problem, try reinstalling that package. If you can't reinstall using apt-get, try to download .pkg file from kernel.org and install manually (python3-minimal*). E.g.

dpkg -i python3-minimal_*.deb
kenorb
  • 10,347