首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pecl / Python:不支持的区域设置- Ubuntu 13.10

Pecl / Python:不支持的区域设置- Ubuntu 13.10
EN

Stack Overflow用户
提问于 2014-09-19 16:33:00
回答 1查看 2.5K关注 0票数 3

我想安装pecl ssh2扩展。但当我尝试时:

代码语言:javascript
复制
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.3.2 final 0
Distributor ID: Ubuntu
Description:    Ubuntu 13.10
Release:    13.10
Codename:   saucy
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.3/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

我已经尝试了所有的方法,是的,所有我在谷歌上找到的东西!

我尝试过的是:

1-在终端上

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

2-编辑环境(/etc/ environment )

代码语言:javascript
复制
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"

3-编辑区域设置(/etc/default/ locale )

代码语言:javascript
复制
LANG="en_US.UTF-8"

4- apt-获取更新和升级

5-重启系统

区域设置命令:

代码语言: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=
LANGUAGE=
LC_CTYPE=UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
EN

回答 1

Stack Overflow用户

发布于 2014-09-19 18:11:51

您需要给出以下命令:

代码语言:javascript
复制
sudo apt-get install language-pack-en-base -y && sudo locale-gen en_US en_US.UTF-8 && sudo dpkg-reconfigure locales

这应该可以解决您的问题。

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

https://stackoverflow.com/questions/25929604

复制
相关文章

相似问题

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