Ubuntu 22.04.01 LTS Jammy
Apt 或 python 出了点问题。我不知道如何解决此问题。我尝试重新安装多个版本的 python,并重新安装 software-properties-common。我看过与其他问题相关的问题和答案,但它们都不适用或已经过时多年——尝试这样的解决方案会很危险。
$ sudo add-apt-repository ppa:deadsnakes/ppa
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 15, in <module>
from softwareproperties.shortcuthandler import ShortcutException
File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 26, in <module>
from softwareproperties.extendedsourceslist import (SourceEntry,
File "/usr/lib/python3/dist-packages/softwareproperties/extendedsourceslist.py", line 436
def __init__(self, sourceslist=None, /, files=None):
^
SyntaxError: invalid syntax