命令未找到’不支持的语言环境设置’错误

我最近通过保留Linux Mint 13发行版的主文件夹来安装Ubuntu 12.10。 系统安装正常,但在开始时一切都是中文(甚至是终端中的文本)。 我设法通过编辑一些文件来解决这个问题,但是每当在终端中找不到命令时我仍然会收到错误。 这里是:

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.2.3 final 0 Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal Exception information: unsupported locale setting 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 69, in main enable_i18n() File "/usr/lib/command-not-found", line 40, in enable_i18n locale.setlocale(locale.LC_ALL, '') File "/usr/lib/python3.2/locale.py", line 541, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting 

我怎样才能摆脱这个错误。 它说它是一个语言环境错误,所以我猜它可能与初始语言问题有关,但我不是linux的专家。 你有什么意见?

我有同样的问题,但在ubuntuforums上找到了以下解决方案:

 export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 locale-gen en_US.UTF-8 sudo dpkg-reconfigure locales 

我查看了/etc/default/locale ,其中一些语言选项是中文的。 我删除了这些并添加了以下内容,现在一切都很好:

 LC_ALL="en_US.UTF-8"