首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >薄荷源由于未知的原因无法工作。

问薄荷源由于未知的原因无法工作。
EN

Unix & Linux用户
提问于 2020-11-17 17:19:48
回答 1查看 269关注 0票数 0

我在Linux 20肉桂上生根并意外地运行mintsources:

代码语言:javascript
复制
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中输入密码后得到了完全相同的结果:

代码语言:javascript
复制
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了,所以也许这不是原因,我只是不知道,从哪里开始。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2020-11-17 17:26:15

解决后,我从这个文件中删除了所有的双空格(以及更多的额外空间):

代码语言:javascript
复制
/etc/apt/sources.list.d/official-package-repositories.list

我记得我喜欢用更多的空格编辑它,使列对齐。同时也合并了一些条目。

这些组合显然不介意,但额外的空格(对于mintsources,而不是apt)可以。

最后,看起来是这样的:

代码语言:javascript
复制
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,也可以运行根用户。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/620136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档