无法重新安装 ubuntu 桌面 python3-minimal 问题

无法重新安装 ubuntu 桌面 python3-minimal 问题

删除 Python 导致系统崩溃。我尝试重新安装它,但遇到了 Python3-minimal 问题。
我搜索了许多 Stacks 并尝试修复。
现在我无法访问 GUI 并重新安装它,因为重新安装需要 Python3-minimal。

Ubuntu 20.04 LTS amd64

这是崩溃时的输出:

sudo apt-get install --reinstall ubuntu-desktop

/var/lib/dpkg/info/python3-minimal.postinst: /usr/bin/py3compile: /usr/bin/pyhton3: bad interpreter:
 No such file or directory
dpkg: error processing package python3-minimal (--configure)
installed python3-minimal package post-installation script subprocess returne error exit status 126
Errors were encountered while processing:
python3-minimal
E: Sub-process /usr/bin/dpkg/ returned an error code (1)

下面我将这个区块标记为“相同的“以使帖子更具可读性。

然后我尝试了所有能找到的可能的修复方法:

sudo dpkg --configure -a相同的

sudo apt -f update 相同的
sudo apt install -f --reinstall python3-minimal

1 not fully installed or removed
E: Internal Erorr, No file name for python3-minimal:amd64

还尝试重新安装依赖项通过这篇文章

sudo apt-get install --reinstall python python-chardet python-colorama python-distlib python-django python-django-tables2 python-six python-html5lib python-lxml python-minimal python-pkg-resources python-setuptools python-urllib3 python-requests python-pip python-virtualenv

Reading package list... Done
Building dependency tree
Reading state information... Done
Note, selecting 'python-is-python2' instead of 'python'
Package python-urllib3 is not available, but is referred to by another package.
is only available from another source

Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package python-colorama
E: Unable to locate package python-django
E: Unable to locate package python-django-tables2
E: Package 'python-urllib3' has no installation candidate
E: Unable to locate package python-request
E: Unable to locate package python-pip
E: Package 'python-virtualenv' has no installation candidate

还尝试自动删除、清理、清除并再次安装。相同的

还尝试下载 .deb 包并手动安装它(也使用 aptitude)相同的

如果我忘记提供更多线索,请告诉我。

附加问题:现在我已经安装并完全运行了 python2.7,我可以以某种方式用它重新安装 ubuntu 吗?

更新:我通过 wget 安装了 python3.3 和 python3.9.5 源,但这没有帮助。
以下是更多线索:

namei $(which python3) $(which python)
f: /usr/bin/python
d /
d usr
d bin
d python3.9.5
d bin
-python 3.9

dpkg -l | egrep -v '^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacke/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-====================-=================-======-==============================
ic python3               3.8.2-0ubuntu2    amd64  high-level object-oriented lan
iF python3-minimal       3.8.2-0ubuntu2    amd64  minimal subset of Python

whereis python
python: /usr/bin/pyhton2.7 /usr/bin/python /usr/bin/python3.9 /usr/lib/pyhton2.7 /etc/python2.7 /usr/local/lib/python2.7 /usr/share/python /opt/python3.3/bin/python3.3 /opt/python3.3/bin/pyhton3.3-config /opt/python3.3/bin/python3.3m /opt/python3.3/bin/pyhton3.3m-config

whereis python3
python3: /usr/bin/python3 /usr/bin/python3.9 /usr/bin/python3 /etc/python3 /usr/share/python3 /opt/python3.3/bin/python3.3 /opt/python3.3/bin/python3.3-config /opt/python3.3/bin/python3.3m /opt/python3.3/bin/python3.3m-config /usr/share/man/ma1/python3.1.gz

相关内容