开发者

linux locale unset

I have a ARM based machine with ubuntu distro on it and it often feeds me with this while running various commands:

 Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "pl_PL.UTF-8"

This is output of the locale command

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESS开发者_开发问答AGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

What should I do to stop it from popping now and then and configure it properly for the ąęśćźńół [important characters of mine]?


OK, I found it

In some ubuntu distros on non 32bit x86 architectures it is misconfigured. I needed to

sudo apt-get install language-pack-pl

or sudo apt-get install --reinstall language-pack-pl if already installed pl is the language code. Change to Yours.

and then

cd /usr/lib/locale
sudo ln -s pl_PL.utf8 pl_PL

and it's fixed


Of course installing the needed locales (sudo dpkg-reconfigure locales) is the best option, if you can.

But I do disable them sometimes, like follows:

unset $(locale|cut -d= -f1)


Try:

sudo dpkg-reconfigure locales

And select locales which You want use. Next select default and finish.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜