我正在尝试安装 redis像这儿。但是这样做时make
,出现错误:不支持的区域设置:
# 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
安装所有本地程序
sudo apt-get install language-pack-id
然后配置
sudo dpkg-reconfigure locales
然后重试。
好的,手动配置它们。
逐行粘贴这些行
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
答案2
如果你正在使用proot 发行版在 termux 中,以下功能有效.bashrc
:
export LANG=C.UTF-8
如果您不幸错误地设置了LANG=en_US.UTF-8
,redis-server 将会报错,提示不支持的语言环境错误。修复方法对于 Fedora 和 Ubuntu 是相同的。