我遇到的“LC_ALL unset”解决方法

解决LC_ALL = (unset),LANGUAGE = (unset),

网上搜的方法,如

sudo locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

to the file /etc/environment:

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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

在terminal里面输入

locale 然后

export LANGUAGE=en_US.UTF-8

export LC_ALL=ex_US.UTF-8

再 locale 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

通通无效,因此,阅读英文论坛,回帖中发现:

在 .bashrc 中

添加 

export LC_ALL="en_US.UTF-8" 

执行一下,即 . ~/.bashrc

有效!真是开心。分享之。

问题描述:(我是在git pull 命令后看到)

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "zh_CN.UTF-8",
LC_ADDRESS = "zh_CN.UTF-8",
LC_MONETARY = "zh_CN.UTF-8",
LC_NUMERIC = "zh_CN.UTF-8",
LC_TELEPHONE = "zh_CN.UTF-8",
LC_IDENTIFICATION = "zh_CN.UTF-8",
LC_MEASUREMENT = "zh_CN.UTF-8",
LC_TIME = "zh_CN.UTF-8",
LC_NAME = "zh_CN.UTF-8",
LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Already up-to-date

你可能感兴趣的:(Ubuntu环境)