包管理器DNF Broken

时间:2017-07-27 08:12:08

标签: fedora dnf

在Fedora 23中,有人知道为什么DNF会搞乱吗?

root>dnf info       
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1098, in run
    self._process_demands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 813, in _process_demands
    load_available_repos=lar)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 239, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 115, in _add_repo_to_sack
    hrepo.filelists_fn = repo.filelists_fn
TypeError: Expected a string or a unicode object

无法使用其他dnf命令

2 个答案:

答案 0 :(得分:1)

我有同样的问题,从/etc/yum.repos.d/文件夹中删除一个(最有可能已损坏).repo解决了这个问题。

答案 1 :(得分:0)

删除了所有回购。似乎已经腐败了。