首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不支持的地区设置

不支持的地区设置
EN

Ask Ubuntu用户
提问于 2014-04-12 07:43:41
回答 1查看 6K关注 0票数 4

每当我通过SSH登录到我的Ubuntu12.10服务器时,我会看到:

代码语言:javascript
复制
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
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

我试过-

  • 导出正确的区域设置
  • EXPORT命令添加到/etc/environment
  • dpkg-reconfigure locale
  • 运行locale并检查en_GBen_GB.UTF-8区域设置(确实如此)
  • locale-gen en_GB.UTF-8重新生成地区

以及以上的各种组合。还有谁知道我还能尝试什么吗?

编辑更多信息应贡纳·哈马尔松的要求

locale命令的输出:

代码语言:javascript
复制
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE=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=

/etc/default/locale含量

代码语言:javascript
复制
LANG="en_GB.UTF-8"
LANGUAGE="en_GB:en"
LC_ALL="en_GB.UTF-8"
EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2014-04-12 13:34:34

这个问题很可能是由于LC_CTYPE被设置为"UTF-8“而不是一个有效的地区名称造成的。因此,您需要弄清楚它是如何发生的,并删除不正确的设置。

票数 3
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/446793

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档