web-dev-qa-db-fra.com

Paramètre de paramètres régionaux non pris en charge

Chaque fois que je me connecte à mon serveur Ubuntu 12.10 via SSH, je vois:

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

J'ai essayé -

  • exporter les bonnes locales
  • ajout de la commande EXPORT à /etc/environment
  • dpkg-reconfigure locale
  • exécuter locale et vérifier les paramètres régionaux en_GB et en_GB.UTF-8 sont installés (ce qui est le cas)
  • régénérer les locales avec locale-gen en_GB.UTF-8

et diverses combinaisons de ce qui précède. Quelqu'un sait quelque chose d'autre que je peux essayer?

[modifier] Plus d'infos demandées par Gunnar Hjalmarsson

Sortie de la commande 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=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=

Contenu de /etc/default/locale

LANG="en_GB.UTF-8"
LANGUAGE="en_GB:en"
LC_ALL="en_GB.UTF-8"
4
hippyjim

Le problème est probablement dû au fait que LC_CTYPE est en quelque sorte défini sur "UTF-8", ce qui n’est pas un nom de paramètres régionaux correct. Vous devez donc comprendre comment cela se passe et supprimer ce paramètre incorrect.

3
Gunnar Hjalmarsson