我在Linux 20肉桂上生根并意外地运行mintsources:
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1919, in <module>
Application().run()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 968, in __init__
self.detect_official_sources()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1834, in detect_official_sources
self.update_flags()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1841, in update_flags
if selected_mirror[-1] == "/":
IndexError: string index out of range我不知道这是否是我不能以普通用户的身份运行它的原因,现在我在GUI中输入密码后得到了完全相同的结果:
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1919, in <module>
Application().run()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 968, in __init__
self.detect_official_sources()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1834, in detect_official_sources
self.update_flags()
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1841, in update_flags
if selected_mirror[-1] == "/":
IndexError: string index out of range因为我不明白回溯电话,我相信你会帮我解决这个问题,我已经一年没有使用mintsources了,所以也许这不是原因,我只是不知道,从哪里开始。
发布于 2020-11-17 17:26:15
解决后,我从这个文件中删除了所有的双空格(以及更多的额外空间):
/etc/apt/sources.list.d/official-package-repositories.list我记得我喜欢用更多的空格编辑它,使列对齐。同时也合并了一些条目。
这些组合显然不介意,但额外的空格(对于mintsources,而不是apt)可以。
最后,看起来是这样的:
deb http://packages.linuxmint.com ulyana main upstream import backport
deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner之后,我既可以作为普通用户运行mintsources,也可以运行根用户。
https://unix.stackexchange.com/questions/620136
复制相似问题