![由于缺少 python,apt 系统失败,但它就在那里](https://linux22.com/image/1022609/%E7%94%B1%E4%BA%8E%E7%BC%BA%E5%B0%91%20python%EF%BC%8Capt%20%E7%B3%BB%E7%BB%9F%E5%A4%B1%E8%B4%A5%EF%BC%8C%E4%BD%86%E5%AE%83%E5%B0%B1%E5%9C%A8%E9%82%A3%E9%87%8C.png)
尝试从 18.04 升级到 20.04 失败,导致系统崩溃,希望只有一个元素 - 系统无法识别 python,尽管我在 /usr/bin 中修补了 (符号链接),因此“pythin --version”和“which python”可以工作。但 apt 失败了-
xxx@u9e16c415e3b459:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
alacarte : Depends: python:any (>= 2.7.5-5~)
ansible : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7~)
autokey-common : Depends: python (< 2.8)
.................
.................
与修复损坏的尝试相同
xxxxx@u9e16c415e3b459:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
alacarte : Depends: python:any (>= 2.7.5-5~)
ansible : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7~)
.................
.................
xxxxx@u9e16c415e3b459:~$ which python
/usr/bin/python
xxxxx@u9e16c415e3b459:~$ python
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
知道如何恢复吗?当然,重新安装 python 也会失败