. Недавно я обновил свой выпуск Python с 3.8 до 3.10, используя
sudo update-alternatives --config python3
, но, похоже, это где-то вызвало проблему с apt. Всякий раз, когда я пытаюсь запустить sudo apt-get update
, он работает, как и ожидалось. Когда я пытаюсь запустить sudo apt-get upgrade
, я сталкиваюсь со следующей проблемой.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up python-apt (2.0.0ubuntu0.20.04.6) ...
/var/lib/dpkg/info/python-apt.postinst: 6: pycompile: not found
dpkg: error processing package python-apt (--configure):
installed python-apt package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python-apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
Когда я пытаюсь переустановить python apt, чтобы решить эту проблему с помощью sudo apt install --reinstall python-apt
, я получаю следующую ошибку.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for python-apt:amd64
Кто-нибудь знает, как это исправить? Я также не могу открыть программу обновления программного обеспечения.