我无法在 Linux mint 中添加 winhq 存储库

我无法在 Linux mint 中添加 winhq 存储库

当我尝试运行此命令来添加 wine 存储库时

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

我收到这个错误

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1928, in <module>
    add_repository_via_cli(ppa_line, codename, "-y" in args, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 187, in add_repository_via_cli
    if repo_exists(line):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 232, in repo_exists
    repositories = SourcesList().list
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_linuxmint_mintSources_mintSources.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1928, in <module>
    add_repository_via_cli(ppa_line, codename, "-y" in args, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 187, in add_repository_via_cli
    if repo_exists(line):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 232, in repo_exists
    repositories = SourcesList().list
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'

我还尝试将焦点更改为仿生和常规,但它不起作用
我认为这是存储库本身的问题,但有人知道如何解决它吗?

答案1

日志文件显示:FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'.

但您的其他帖子说您使用的是 Pop!_OS 20.04 LTS,并且您尝试安装 Python3:崩溃后的错误 ACPI BIOS 错误 (BUG):无法解析符号 AE_NOT_FOUND

这意味着以下内容:

  • 存储库没有错误,但来自您安装的 Python3。
  • 这是因为你安装了Python,它被杀死了python-apt,而且apt.

错误非常明显,您已经终止了 Linux 安装。最好再次安装 Ubuntu 20.04 LTS,并停止跳转 Linux 发行版,因为“它不起作用”,因为你杀死了它们。你已经从 Ubuntu 跳到了 Linux Mint,然后又跳到了 Pop!_OS

如果您选择Ubuntu路径,我可以建议您Xubuntu 20.04.02 LTS(http://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/20.04/release/xubuntu-20.04.2-desktop-amd64.iso)相反,因为您似乎想要自定义您的操作系统,并且默认的 Pop!_OS 和 Ubuntu 桌面环境(称为 Gnome 3)在这方面非常有限。

相关内容