2014-09-19 89 views
3

我想安裝pecl ssh2擴展。但當我嘗試:Pecl/Python:不受支持的語言環境設置 - Ubuntu 13.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.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-在終端

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 /環境)

LC_ALL="en_US.UTF-8" 
LANG="en_US.UTF-8" 

3-編輯區域設置(/等/ default/locale)

LANG="en_US.UTF-8" 

4- apt-get的更新升級&

5重啓系統

locale命令:

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= 
+0

語言環境不支持LC_ALL,因爲您在消息「locale:無法將LC_ALL設置爲默認語言環境:沒有此文件或目錄」中看到過。取消設置LC_ALL,您可能能夠擺脫困境。 – 2014-09-19 08:49:05

回答

3

你需要給下面的命令:

sudo apt-get install language-pack-en-base -y && sudo locale-gen en_US en_US.UTF-8 && sudo dpkg-reconfigure locales 

這應該可以解決您的問題。