准备解压 /var/lib/dpkg/info/software-properties-gtk.prerm: 6: /var/lib/dpkg/info/software-properties-gtk.prerm: py3clean: 未找到

准备解压 /var/lib/dpkg/info/software-properties-gtk.prerm: 6: /var/lib/dpkg/info/software-properties-gtk.prerm: py3clean: 未找到

我从 /usr/bin/ 中删除了 python

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

答案1

运行以下命令:

apt-get  -f install

纠正存在破坏依赖关系的系统。

也尝试:dpkg --configure -a


请注意,py3compile文件是软件包的一部分python3-minimal,因此如果问题仍然存在,请尝试重新安装该软件包。如果无法使用重新安装apt-get,请尝试.pkg从 kernel.org下载文件并手动安装(python3-minimal*)。例如

dpkg -i python3-minimal_*.deb

相关内容