Ubuntu 14.04 — 由于语言环境导致命令未找到而崩溃

Ubuntu 14.04 — 由于语言环境导致命令未找到而崩溃

当我输入错误的命令时,找不到命令会崩溃:

root@stack1:~# fubar
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.4.3 final 0
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty
Exception information:

'locale' codec can't decode byte 0xc3 in position 12: Invalid or incomplete multibyte or wide character
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 72, in main
    enable_i18n()
  File "/usr/lib/command-not-found", line 41, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.4/locale.py", line 592, in setlocale
    return _setlocale(category, locale)
UnicodeDecodeError: 'locale' codec can't decode byte 0xc3 in position 12: Invalid or incomplete multibyte or wide character

我该如何解决?

答案1

最有可能是本地化问题。

错误消息中包含了解决您的问题的适当措施。通过提供的 URL 向 Ubuntu 团队提交错误报告。

答案2

您的一个 .mo 文件似乎已损坏。运行dpkg --list |grep language-pack-并检查安装了哪些语言环境包,然后使用 重新安装/更新它们apt-get --reinstal install ...。首先运行可能会有所帮助apt-get update

还要检查您的文件系统是否存在其他损坏。

相关内容