1

I am trying to install redis like here. But when do make, got error unsupported locale setting:

# make
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.1 final 0
Distributor ID: Ubuntu
Description:    Ubuntu 13.04
Release:    13.04
Codename:   raring
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
  • edited my answer. eye it
    – Raja G
    Sep 30, 2013 at 15:40

2 Answers 2

5

Install all the locals

sudo apt-get install language-pack-id

and then configure

sudo dpkg-reconfigure locales

then try again.

Ok configure them manually .

paste these lines one after one

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
3
  • Done. The same error. Sep 30, 2013 at 15:32
  • 1
    manual configuration was successfull. Thank you Sep 30, 2013 at 15:44
  • @efr glad to hear that.
    – Raja G
    Sep 30, 2013 at 15:45
0

If you are using proot-distro in termux, the following works in .bashrc:

export LANG=C.UTF-8

If you make the unfortunate mistake of setting LANG=en_US.UTF-8, redis-server will complain with an unsupported locale error. The fix is the same for Fedora and Ubuntu.

New contributor
Roy Hyunjin Han is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .