Fedora 27 中的 dnf 抛出了 python 错误

Fedora 27 中的 dnf 抛出了 python 错误

我正在寻求从 Fedora 27 升级,但是 DNF 不知为何损坏了。

$ dnf upgrade
Traceback (most recent call last):
  File "/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1013, in run
    self._process_demands()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 766, in _process_demands
    load_available_repos=self.demands.available_repos)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 353, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 122, in _add_repo_to_sack
    hrepo.filelists_fn = repo._filelists_fn
TypeError: Expected a string or a unicode object

以下是我安装的软件包的版本:

$ rpm -q dnf python3-dnf python3 python3-rpm
dnf-2.7.5-2.fc27.noarch
python3-dnf-2.7.5-2.fc27.noarch
python3-3.6.6-1.fc27.x86_64
python3-rpm-4.14.2.1-1.fc27.x86_64

我尝试从 koji 重新安装 dnf 包(https://koji.fedoraproject.org/koji/buildinfo?buildID=1006088),但没有什么区别。我不确定我还能尝试什么。自从 dnf 停产以来,我已经有一段时间没有使用它了,但现在我想升级,这个错误让我感到惊讶。是否可以追踪发生了什么,以便我可以修复 dnf 并最终升级?

答案1

所以我在 Fedora 项目论坛上提出了这个问题,请参阅完整对话这里https://ask.fedoraproject.org/t/fedora-27-dnf-throwing-python-error-cannot-upgrade/1463

tl;dr - 我必须禁用 PlexRepo,然后运行dnf clean alldnf upgrade --refresh在不禁用 PlexRepo 的情况下执行这些命令会引发错误,因此该存储库一定存在问题。

相关内容