Ask Your Question
1

dnf broken after power loss

asked 2019-03-01 13:58:54 -0600

matthew.hudson gravatar image

updated 2019-03-01 15:07:43 -0600

after dnf update and power loss i get this.

[root@localhost Downloads]# dnf update
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/python3.7/site-packages/dnf/cli/main.py", line 193, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 90, in _main
    cli = cli_class(base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 699, in __init__
    self.register_command(dnf.cli.commands.alias.AliasCommand)
AttributeError: module 'dnf.cli.commands.alias' has no attribute 'AliasCommand'
edit retag flag offensive close merge delete

Comments

Please use the code button when posting terminal output to make it easier to read. Are you able to run any other dnf commands?

bob323 gravatar imagebob323 ( 2019-03-01 14:50:34 -0600 )edit
1

Assuming that the problem is only related to dnf you can grab the package(s) from the noarch section from here. Then install them with sudo rpm -Uvh *.rpm --force. This should restore your local dnf installation. Beware there could be other reasons why dnf got broken. Do you have another instance of Python that takes priority over the default one?

vmercuri gravatar imagevmercuri ( 2019-03-01 18:24:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-05 02:47:23 -0600

Toover gravatar image

You may reinstall dnf manually, by downloading it from a mirror, and then running rpm -i ${DOWNLOADED_RPM}.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-03-01 13:58:54 -0600

Seen: 100 times

Last updated: Mar 01 '19