我到处搜索但找不到解决方案。
如果我跑步update-manager
,软件更新程序开始加载,但随后我得到了崩溃报告. 回溯的部分内容如下:
[...]
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 477, in _inline_callbacks
result = gen.throw(result.type(result.value).with_traceback(result.traceback))
File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 67, in update
_("Checking for updates…"), False)
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 477, in _inline_callbacks
result = gen.throw(result.type(result.value).with_traceback(result.traceback))
File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 159, in _show_transaction
yield trans.run()
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 477, in _inline_callbacks
result = gen.throw(result.type(result.value).with_traceback(result.traceback))
File "/usr/lib/python3/dist-packages/aptdaemon/core.py", line 913, in _run
yield self._check_auth()
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 477, in _inline_callbacks
result = gen.throw(result.type(result.value).with_traceback(result.traceback))
File "/usr/lib/python3/dist-packages/aptdaemon/core.py", line 965, in _check_auth
authorized = yield self._check_alternative_auth()
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 477, in _inline_callbacks
result = gen.throw(result.type(result.value).with_traceback(result.traceback))
TypeError: __init__() missing 1 required positional argument: 'action_id'
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 390, in _next
self.result = callback(self.result, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 535, in gotResult
_inline_callbacks(res, gen, deferred)
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 525, in _inline_callbacks
deferred.errback()
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 352, in errback
self._next()
File "/usr/local/lib/python3.5/dist-packages/defer/__init__.py", line 408, in _next
self.result.traceback)
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 98, in apport_excepthook
pr['_PythonExceptionQualifier'] = name
File "/usr/lib/python3/dist-packages/problem_report.py", line 652, in __setitem__
raise TypeError("value for key %s must be a string, CompressedValue, or a file reference" % k)
TypeError: value for key _PythonExceptionQualifier must be a string, CompressedValue, or a file reference
现在,如果我尝试,sudo apt-get upgrade
我会得到以下结果:
Setting up update-notifier-common (3.168.4) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
ImportError: No module named 'debian'
dpkg: error processing package update-notifier-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
update-notifier depends on update-notifier-common (= 3.168.4); however:
Package update-notifier-common is not configured yet.
dpkg: error processing package update-notifier (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-notifier; however:
Package update-notifier is not configured yet.
dpkg: error processing package update-manager (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
ubuntu-release-upgrader-gtk depends on update-manager; however:
Package update-manager is not configured yet.
dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
update-notifier-common
update-notifier
update-manager
ubuntu-release-upgrader-gtk
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果我尝试,也会得到相同的输出sudo apt-get autoremove
。我正在使用Ubuntu 16.04(4.8.0-49-通用)。
我到处寻找答案,但没有任何东西可以解决我的问题。
答案1
我在 16.10 上遇到了同样的问题,升级到 17.04 也没有帮助。我很确定问题是由于 python3 包冲突引起的,查看异常的跟踪,它似乎正在使用来自/usr/lib/python3
(apt managed)和来自/usr/local/lib/python3.5
(pip managed)的包。我删除了所有 pip 安装的包,重新安装了 update-manager/python3-aptdaemon/etc,但没有用... 经过一些额外的尝试,删除和清除所有内容,然后重新安装,似乎 update-manager 在使用synaptic
后端时可以正常工作,而不是aptdaemon
。到目前为止一切都很好。不幸的是,我无法提供任何步骤来重现或解决这个问题。