Ask Your Question
0

dnf needs-restarting crashes

asked 2016-02-18 09:25:54 -0500

florian gravatar image

dnf needs-restarting, the dnf replacement of needs-restarting of yum-utils crashes on my Fedora 22 system.

Here is what happens:

$ sudo dnf needs-restarting
Traceback (most recent call last):
  File "/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 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.py", line 199, in run
    for ofile in list_opened_files(uid):
  File "/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.py", line 51, in list_opened_files
    ofile = smap2opened_file(pid, line)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.py", line 106, in smap2opened_file
    slash = line.find('/')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 148: ordinal not in range(128)

dnf needs-restarting -u (--useronly) leads to the exact same error.

Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-18 15:32:39 -0500

robyduck gravatar image

updated 2016-02-18 15:33:16 -0500

There are several bugs filed in Bugzilla about this, and the reason is a bad python (2) UTF support. You can do a workaround until this will be fixed (python 3), like:

alias dnf='LANG=C dnf'

You should also be able to do:

env LANG=C sudo dnf clean all && env LANG=C sudo dnf needs-restarting
edit flag offensive delete link more

Comments

Thanks for explanation.

florian gravatar imageflorian ( 2016-02-18 23:07:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-18 09:25:54 -0500

Seen: 287 times

Last updated: Feb 18 '16