有一天我尝试更新并update-manager
崩溃了:
Traceback (most recent call last):
File "/usr/bin/update-manager", line 114, in <module>
app = UpdateManager(data_dir, options)
File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 113, in __init__
self.options and self.options.use_proposed)
File "/usr/lib/python3/dist-packages/UpdateManager/MetaReleaseGObject.py", line 44, in __init__
MetaReleaseCore.__init__(self, useDevelopmentRelease, useProposed)
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 93, in __init__
cache = apt.Cache()
File "/usr/lib/python3/dist-packages/apt/cache.py", line 107, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 172, in open
self._set.add(pkg.get_fullname(pretty=True))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
重新启动有时会update-manager
起作用,当它起作用时,它会aptd
崩溃,并出现如上所示的最后 3 行 UnicodeDecodeError,根据 apport 窗口。
我以为更新会有同样的问题这里. 没有描述点文件第一个答案手动查看文件时/etc/apt/sources.list.d
没有发现垃圾文本,但有些文件中没有任何内容。我以为是语言环境问题,于是运行它,gnome-language-selector
结果崩溃了:
Traceback (most recent call last):
File "/usr/bin/gnome-language-selector", line 22, in on_activate
options=options)
File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 196, in __init__
self.updateLanguageView()
File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 709, in updateLanguageView
self.openCache(progress)
File "/usr/lib/python3/dist-packages/LanguageSelector/LanguageSelector.py", line 33, in openCache
self._cache = LanguageSelector.LangCache.LanguageSelectorPkgCache(self._localeinfo, progress)
File "/usr/lib/python3/dist-packages/LanguageSelector/LangCache.py", line 76, in __init__
apt.Cache.__init__(self, progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 107, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 172, in open
self._set.add(pkg.get_fullname(pretty=True))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
认为这与这,我运行locale
并得到了这个:
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8
所以我认为这不是相同的 ASCII/UTF-8 冲突问题。有没有办法修复这个问题,或者至少能帮我找到问题所在?
这种情况已经持续了几个星期,但崩溃的次数并不多,因此我认为这是一个大问题,因为我可以改天再更新。不过,这可能会成为一个更大的问题,所以我还是问一下以防万一。