软件更新程序 (update-manager) 卡住了,但 `apt update` 和 `apt upgrade` 工作正常。如何修复更新管理器?

软件更新程序 (update-manager) 卡住了,但 `apt update` 和 `apt upgrade` 工作正常。如何修复更新管理器?

软件更新程序 (update-manager) 卡住了,但apt updateapt upgrade工作正常。我尝试使用sudo dpkg --configure -a。错误堆栈跟踪如下:

update-manager
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 448, in _on_finished
    self._action_done(action,
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 365, in _action_done
    self.window_main.start_available()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 241, in start_available
    self.refresh_cache()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 459, in refresh_cache
    self._get_ua_security_status()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 285, in _get_ua_security_status
    s = json.load(p.stdout)
  File "/usr/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
^CTraceback (most recent call last):
  File "/usr/bin/update-manager", line 125, in <module>
    Gtk.main()
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 1687, in main
    with register_sigint_fallback(Gtk.main_quit):
  File "/usr/lib/python3.10/contextlib.py", line 142, in __exit__
    next(self.gen)
  File "/usr/lib/python3/dist-packages/gi/_ossighelper.py", line 237, in register_sigint_fallback
    signal.default_int_handler(signal.SIGINT, None)

答案1

还有一个名为pro(符号链接)的全局节点模块,它实际上是@ant-design/pro-cli/cli.js。它覆盖了正确的pro/usr/bin/pro因此,当更新管理器运行命令时pro security-status --format=json,它永远不会得到正确的响应。我只是将更改为另一个@ant-design/pro-cli/cli.js别名pro

相关内容